Error Page

Outputs error page

@param string $file
@param integer $code
@param string $modulePath
@param mixed $params
@return void
422602
public static function errorPage($file, $code, $modulePath, $params = NULL) {
        parent::setStatus($code);
        
        qt_instance()->output('errors/' . $file, $modulePath, $params);
        exit;
    }
1100329
final function handleError($code, $m, $file = '', $line = 0, $context=[]) {
    	// 2017-07-10
    	// «Magento 2.1 php7.1 will not be supported due to mcrypt deprecation»
		// https://github.com/magento/magento2/issues/5880
		// [PHP 7.1] How to fix the «Function mcrypt_module_open() is deprecated» bug?
		// https://mage2.pro/t/2392
    	if (E_DEPRECATED !== $code || !df_contains($m, 'mcrypt') && !df_contains($m, 'mdecrypt')) {
			$this->ravenClient->breadcrumbs->record([
				'category' => 'error_reporting',
				'message' => $m,
				'level' => $this->ravenClient->translateSeverity($code),
				'data' => ['code' => $code, 'line' => $line, 'file' => $file]
			]);
		}
		return !$this->existingHandler ? false : call_user_func(
			$this->existingHandler, $code, $m, $file, $line, $context
		);
    }
927704
protected function error($code)
    {
        $this->sendFrame('c' . json_encode([$code, isset($this->errors[$code]) ? $this->errors[$code] : null]));
    }
268259
public function handler($errno, $errstr, $errfile, $errline)
    {
        throw new \ErrorException($errstr, $errno, 0, $errfile, $errline);
    }
314050
public function error($errno, $error, $file, $line) {
        try {
            throw new MyException($error, $errno, $file, $line);
        } catch (MyException $e) {
            ERRORCODE($e);
        }
    }
65374
public function handleError($errno, $errstr, $errfile, $errline)
    {
        if (!$this['debug']) {
            return;
        }

        throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
    }
12684
public function php_error_handler($errno, $errstr, $errfile, $errline)
    {
        $e = new \Exception($errstr, $errno);
        call_user_func($this->error50x, $e);
    }
1124829
public static function onError( $code, $message, $file = null, $line = null, $context = null )
    {
        $_trace = \debug_backtrace();
        $_traceText = static::_cleanTrace( $_trace, 3 );

        if ( E_NOTICE == $code )
        {
            //return false;
        }

        static::$_error = array(
            'code'       => $code,
            'type'       => null,
            'message'    => $message,
            'file'       => $file,
            'line'       => $line,
            'trace'      => $_traceText,
            'traces'     => $_trace,
            'source'     => static::_getCodeLines( $file, $line, static::$_sourceLines ),
            'start_line' => static::$_startLine,
        );

        Log::error( static::$_error['message'] . ' (' . static::$_error['code'] . ')' );

        return static::renderError();
    }
719742
public function error( $code ) {
		header( $_SERVER["SERVER_PROTOCOL"] . Route::$HttpResponse[ $code ] );

		if ( $this->config->get( "error.$code" ) != '' ) {
			echo $this->render( $this->config->get( 'path.template' ) . '/' . $this->config->get( "error.$code" ) . '.php' );
		} else {
			die( Route::$HttpResponse[ $code ] );
		}

	}
926084
static function ErrorHandler($errno, $errstr, $errfile, $errline)
    {
        switch ($errno) {
            case E_ERROR:
                $errtype = ReporticoLang::translate("Error");
                break;
            case E_NOTICE:
                $errtype = ReporticoLang::translate("Notice");
                break;
            case E_USER_ERROR:
                $errtype = ReporticoLang::translate("Error");
                break;
            case E_USER_WARNING:
                $errtype = ReporticoLang::translate("");
                break;
            case E_USER_NOTICE:
                $errtype = ReporticoLang::translate("");
                break;
            case E_WARNING:
                $errtype = ReporticoLang::translate("");
                break;

            default:
                $errtype = ReporticoLang::translate("Fatal Error");

        }
        
        
        // If request parameter errorsInModal is set then popup first user error
        // back to client and exit. This is to popup errors when probles in saving reports
        if ( ReporticoUtility::getRequestItem("errorsInModal") && $errno == E_USER_ERROR ) {


            header("HTTP/1.0 404 Not Found", true);
            echo $errstr;
            die;


        }
        // Avoid adding duplicate errors
        $errors = &self::getSystemErrors();
        $ct = 0;
        foreach ( self::getSystemErrors() as $k => $val) {
            if ($val["errstr"] == $errstr) {
                $errors[$k]["errct"] = $ct+1;
                return;
            }
        }

        $errors[] =
                array(
                "errno" => $errno,
                "errstr" => $errstr,
                "errfile" => $errfile,
                "errline" => $errline,
                "errtype" => $errtype,
                "errarea" => self::get("code_area"),
                "errsource" => self::get("code_source"),
                "errct" => 1,
                );
        //echo "<PRE>";
        //var_dump($errors);
        //echo "</PRE>";

        self::set("error_status", 1);

    }
909602
public function error($error, $code = 0)
    {
        $this->_errors[] = $error instanceof Error ? $error : new Error($code, $error);
    }
414461
public function errorHandler($errno, $errstr = '', $errfile = '', $errline = '')
    {
        if (!($errno & error_reporting())) {
            return;
        }
        $this->log->error("Code:{code}\tMsg:{msg}\tFile:{file}\tLine:{line}",
            ['code' => $errno, 'msg' => $errstr, 'file' => $errfile, 'line' => $errline]);
    }
984119
public function handleError(int $num, string $str, string $file, int $line): void
    {
        $this->handleException(new \ErrorException($str, 0, $num, $file, $line));
        $this->stop(-1);
    }
278041
public function handleError($error, $code, $path, $source, $parameters, $options)
    {
        /* @var \Throwable $error */
        $exception = $options['debug']
            ? $this->getDebuggedException($error, $code, $source, $path, $parameters, $options)
            : $error;

        $handler = $options['error_handler'];
        if (!$handler) {
            // @codeCoverageIgnoreStart
            if ($options['debug'] && $options['exit_on_error']) {
                if ($options['html_error']) {
                    echo $exception->getMessage();
                    exit(1);
                }
                if (!function_exists('xdebug_is_enabled') || !xdebug_is_enabled()) {
                    echo $exception->getMessage()."\n".$exception->getTraceAsString();
                    exit(1);
                }
            }
            // @codeCoverageIgnoreEnd
            throw $exception;
        }

        $handler($exception);
    }
837475
public static function error_handler($errcode, $errstr, $errfile, $errline, $errcontext) {
		throw new \Exception($errstr.' in '.$errfile.' on line '.$errline, $errcode);
	}
1340697
protected function handleError( $errorCode, $errorMessage, $query )
	{
		if( $this->errorLevel )
		{
			$log = new \FS_File_Log_Writer( $this->logFile );
			$log->note( "[".$errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")]" );
			if( $this->errorLevel == 2 )
				trigger_error( $errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")", E_USER_WARNING );
			else if( $this->errorLevel == 3 )
				trigger_error( $errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")", E_USER_ERROR );
			else if( $this->errorLevel == 4 )
				throw new \Exception( $errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")" );
		}
	}
591502
public function PEAR_Error($message = 'unknown error', $code = null,
                        $mode = null, $options = null, $userinfo = null) {
        self::__construct($message, $code, $mode, $options, $userinfo);
    }