private static function filterExceptionArray($xClass, array $a, $xPrefix, $filter)
{
if (isset($a[$xPrefix . 'trace'])) {
$trace = $a[$xPrefix . 'trace'];
unset($a[$xPrefix . 'trace']);
// Ensures the trace is always last
} else {
$trace = array();
}
if (!($filter & Caster::EXCLUDE_VERBOSE)) {
self::traceUnshift($trace, $xClass, $a[Caster::PREFIX_PROTECTED . 'file'], $a[Caster::PREFIX_PROTECTED . 'line']);
$a[$xPrefix . 'trace'] = new TraceStub($trace, self::$traceArgs);
}
if (empty($a[$xPrefix . 'previous'])) {
unset($a[$xPrefix . 'previous']);
}
unset($a[$xPrefix . 'string'], $a[Caster::PREFIX_DYNAMIC . 'xdebug_message'], $a[Caster::PREFIX_DYNAMIC . '__destructorException']);
$a[Caster::PREFIX_PROTECTED . 'file'] = new LinkStub($a[Caster::PREFIX_PROTECTED . 'file'], $a[Caster::PREFIX_PROTECTED . 'line']);
return $a;
}