3namespace Bitrix\Main\Diag;
20 public static function format($exception, $htmlMode =
false, $level = 0)
22 $formatter =
new LogFormatter((
bool)($level & static::SHOW_PARAMETERS), static::MAX_CHARS);
29 $result .=
"Previous exception: ";
31 $result .= $formatter->format(
"{exception}{trace}{delimiter}\n", [
32 'exception' => $exception,
33 'trace' => static::getTrace($exception),
36 while (($exception = $exception->getPrevious()) !==
null);
52 $backtrace = $exception->getTrace();
54 $skip =
"Bitrix\\Main\\Diag\\ExceptionHandler";
57 foreach ($backtrace as $item)
59 if (!isset($item[
'class']) || ($item[
'class'] != $skip))
73 return $exception->getMessage().
' ('.$exception->getCode().
')';
89 $formatter =
new LogFormatter((
bool)($level & static::SHOW_PARAMETERS), static::MAX_CHARS);
91 return $formatter->formatArguments($args);
99 $formatter =
new LogFormatter((
bool)($level & static::SHOW_PARAMETERS), static::MAX_CHARS);
101 return $formatter->formatArgument($arg);
111 return $file .
':' . $line;
static getMessage($exception)
static severityToString($severity)
static getArguments($args, $level)
static format($exception, $htmlMode=false, $level=0)
static getFileLink($file, $line)
static getTrace($exception)
static convertArgumentToString($arg, $level)
static severityToString($severity)