103 $result =
'[' . get_class($exception) .
'] ';
105 if ($exception instanceof \ErrorException)
107 $result .= static::severityToString($exception->getSeverity());
110 $result .=
"\n" . $exception->getMessage() .
' (' . $exception->getCode() .
')' .
"\n";
114 $result .= $exception->getQuery() .
"\n";
117 $file = $exception->getFile();
120 $result .= $file .
':' . $exception->getLine() .
"\n";
192 if (!$this->showArguments)
194 return gettype($arg);
197 switch (gettype($arg))
200 $result = $arg ?
'true' :
'false';
208 $result = (string)$arg;
211 if (is_callable($arg,
false, $callableName))
213 $result =
'fs:' . $callableName;
215 elseif (class_exists($arg,
false))
217 $result =
'c:' . $arg;
219 elseif (interface_exists($arg,
false))
221 $result =
'i:' . $arg;
225 if (mb_strlen($arg) > $this->argMaxChars)
227 $result =
'"' . mb_substr($arg, 0, $this->argMaxChars / 2) .
'...' . mb_substr($arg, -$this->argMaxChars / 2) .
'" (' . mb_strlen($arg) .
')';
231 $result =
'"' . $arg .
'"';
236 if (is_callable($arg,
false, $callableName))
238 $result =
'fa:' . $callableName;
242 $result =
'array(' . count($arg) .
')';
246 $result =
'[' . get_class($arg) .
']';
249 $result =
'r:' . get_resource_type($arg);
252 $result =
'unknown type';
256 return str_replace(
"\n",
'\n', $result);