unset($a[Caster::PREFIX_PROTECTED.'file'
]);
unset($a[Caster::PREFIX_PROTECTED.'line'
]);
unset($a["\0Error\0trace"
],
$a["\0Exception\0trace"
]);
unset($a["\0Error\0previous"
],
$a["\0Exception\0previous"
]);
} return $a;
},
]);
} return $e->
setDataRepresentation($cloner->
cloneVar($throwable));
} public function toArray(): array
{ $exceptions =
[];
foreach (array_merge([$this],
$this->
getAllPrevious()) as $exception) { $exceptions[] =
[ 'message' =>
$exception->
getMessage(),
'class' =>
$exception->
getClass(),
'trace' =>
$exception->
getTrace(),
'data' =>
$exception->
getDataRepresentation(),
];