/** * Causes a fatal error in the page. * Actual handling is delegated to the handler passed in or a default exception * handler for the page. A fatal error can be raised with only a message, in which * case it's assumed to have happened at global scope. * @param string $message The error message * @param string $routine_name The name of the routine where the error occurred (can be empty) * @param string $class_name The name of the class where the error occurred (can be empty) * @param object $obj Reference to the object where the error occurred (can be empty) * @param EXCEPTION_HANDLER $handler The handler for this exception (can be empty) * @version 3.6.0 * @since 2.2.1 * @see set_default_exception_handler() * @see EXCEPTION_HANDLER */ function raise($message, $routine_name = '', $class_name = '', $obj = null, $handler = null) { if (!isset($handler)) { $handler = $GLOBALS['_default_exception_handler']; } if (!isset($handler)) { $handler = new EXCEPTION_HANDLER(); } $handler->raise($message, $routine_name, $class_name, $obj); }
/** * Generates a plain-text page halt with the error information. * @param string $message The error message * @param string $routine_name The name of the routine where the error occurred (can be empty) * @param string $class_name The name of the class where the error occurred (can be empty) * @param object $obj Reference to the object where the error occurred (can be empty) */ public function raise($message, $routine_name, $class_name, $obj) { $this->env->num_exceptions_raised += 1; parent::raise($message, $routine_name, $class_name, $obj); }