91 if ( !$e instanceof \Exception && !$e instanceof \Throwable ) {
92 throw new \InvalidArgumentException(
'Exception/Throwable expected, got '
93 . gettype( $e ) .
' / ' . get_class( $e ) );
97 'class' => get_class( $e ),
98 'message' => $e->getMessage(),
99 'code' => $e->getCode(),
100 'file' => $e->getFile() .
':' . $e->getLine(),
101 'trace' => \MWExceptionHandler::getRedactedTraceAsString( $e ),
104 $previous = $e->getPrevious();