Manual:$wgExceptionHooks

Extensions: $wgExceptionHooks
Hooks that are used for outputting exceptions.
Introduced in version:1.12.0 (r29444)
Removed in version:1.30.0 (Gerrit change 355060; git #I85844a2)
Allowed values:(array of callbacks)
Default value:[]

Details

edit

Hooks that are used for outputting exceptions. Format is:

$wgExceptionHooks['MWException'][] = $funcname;

or:

$wgExceptionHooks['MWException'][] = array( $class, $funcname /*, extra args... */ );

Hooks receive the exception object as their first argument and should return strings or false.