xref: /dokuwiki/inc/Action/Exception/FatalException.php (revision e8aa673904585abd734c81035797cc5bdbe28182)
164ab5140SAndreas Gohr<?php
264ab5140SAndreas Gohr
364ab5140SAndreas Gohrnamespace dokuwiki\Action\Exception;
464ab5140SAndreas Gohr
564ab5140SAndreas Gohr/**
664ab5140SAndreas Gohr * Class FatalException
764ab5140SAndreas Gohr *
864ab5140SAndreas Gohr * A fatal exception during handling the action
964ab5140SAndreas Gohr *
10*e8aa6739SAndreas Gohr * Will abort all handling and display some info to the user. The HTTP status code
11*e8aa6739SAndreas Gohr * can be defined.
1264ab5140SAndreas Gohr *
1364ab5140SAndreas Gohr * @package dokuwiki\Action\Exception
1464ab5140SAndreas Gohr */
1564ab5140SAndreas Gohrclass FatalException extends \Exception {
1664ab5140SAndreas Gohr
1764ab5140SAndreas Gohr    protected $status;
1864ab5140SAndreas Gohr
1964ab5140SAndreas Gohr    /**
2064ab5140SAndreas Gohr     * FatalException constructor.
2164ab5140SAndreas Gohr     *
2264ab5140SAndreas Gohr     * @param string $message the message to send
2364ab5140SAndreas Gohr     * @param int $status the HTTP status to send
2464ab5140SAndreas Gohr     * @param null|\Exception $previous previous exception
2564ab5140SAndreas Gohr     */
2664ab5140SAndreas Gohr    public function __construct($message = 'A fatal error occured', $status = 500, $previous = null) {
2764ab5140SAndreas Gohr        parent::__construct($message, $status, $previous);
2864ab5140SAndreas Gohr    }
2964ab5140SAndreas Gohr}
30