Unhandled exception';
echo '
';
printf('%s „%s” thrown at %s:%d',
get_class($this->context->exception),
$this->context->exception->getMessage(),
$this->context->exception->getFile(),
$this->context->exception->getLine());
echo '
';
echo '';
$count = 0;
foreach ($this->context->exception->getTrace() as $frame)
{
$args = '';
if (isset($frame['args']))
{
$args = array();
foreach ($frame['args'] as $arg)
{
if (is_string($arg))
{
$args[] = "'" . $arg . "'";
}
elseif (is_array($arg))
{
$args[] = "Array";
}
elseif (is_null($arg))
{
$args[] = 'NULL';
}
elseif (is_bool($arg))
{
$args[] = ($arg) ? "true" : "false";
}
elseif (is_object($arg))
{
$args[] = get_class($arg);
}
elseif (is_resource($arg))
{
$args[] = get_resource_type($arg);
}
else
{
$args[] = $arg;
}
}
$args = join(', ', $args);
}
echo '- ';
printf('#%s %s(%s): %s(%s)
',
$count,
isset($frame['file'])
? $frame['file']
: 'unknown file',
isset($frame['line'])
? $frame['line']
: 'unknown line',
isset($frame['class'])
? $frame['class'] . $frame['type'] . $frame['function']
: $frame['function'],
$args);
echo ' ';
$count++;
}
echo '
';