MWExceptionHander::handle() already exist at the end of its task,
so there's no need to have other die() calls.
There were some problems with that:
- wfLogProfilingData() was only called after reporting some exception
- MWExceptionHandler::report() was not consistent between web and
command-linerequests
- MWException::reportHTML() was also not consistent when using the
OutputPage object or not
Also removed MWExceptionHander::escapeEchoAndDie() since it's not needed anymore.
Change-Id: Ibb679c425ef0271a65f623c7b8541ec9bec70eb0
}
echo "</body></html>\n";
- die( 1 );
}
}
if ( $cmdLine ) {
self::printError( $message );
} else {
- self::escapeEchoAndDie( $message );
+ echo nl2br( htmlspecialchars( $message ) ) . "\n";
}
}
} else {
if ( $cmdLine ) {
self::printError( $message );
} else {
- self::escapeEchoAndDie( $message );
+ echo nl2br( htmlspecialchars( $message ) ) . "\n";
}
}
}
}
}
- /**
- * Print a message after escaping it and converting newlines to <br>
- * Use this for non-command line failures.
- *
- * @param $message string Failure text
- */
- private static function escapeEchoAndDie( $message ) {
- echo nl2br( htmlspecialchars( $message ) ) . "\n";
- die(1);
- }
-
/**
* Exception handler which simulates the appropriate catch() handling:
*