mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 17:16:18 +02:00
Move getClass method to a Utils class, refs #1190
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
namespace Monolog\Formatter;
|
||||
|
||||
use Exception;
|
||||
use Monolog\Registry;
|
||||
use Monolog\Utils;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
@@ -180,11 +180,11 @@ class JsonFormatter extends NormalizerFormatter
|
||||
{
|
||||
// TODO 2.0 only check for Throwable
|
||||
if (!$e instanceof Exception && !$e instanceof Throwable) {
|
||||
throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Registry::getClass($e));
|
||||
throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'class' => Registry::getClass($e),
|
||||
'class' => Utils::getClass($e),
|
||||
'message' => $e->getMessage(),
|
||||
'code' => $e->getCode(),
|
||||
'file' => $e->getFile().':'.$e->getLine(),
|
||||
|
Reference in New Issue
Block a user