/** * In case there is an unrecoverable error, this method should be called. The application will be terminated and * remaining error messages are flushed. * * @api * * @param string $message last message before application dies */ public static function death($message = '') { // this code is not safe for use in different tabs foreach (Session::getErrorMsg() as $error) { echo $error['content'] . "\n"; } die($message); }