*
* @param $event String: event name
* @param $args Array: parameters passed to hook functions
- * @return Boolean
+ * @return Boolean True if no handler aborted the hook
*/
public static function run( $event, $args = array() ) {
global $wgHooks;
/* String return is an error; false return means stop processing. */
if ( is_string( $retval ) ) {
- global $wgOut;
- $wgOut->showFatalError( $retval );
- return false;
+ throw new FatalError( $retval );
} elseif( $retval === null ) {
if ( $closure ) {
$prettyFunc = "$event closure";