BookStack\Exceptions\Handler::isExceptionType PHP Method

isExceptionType() protected method

Check the exception chain to compare against the original exception type.
protected isExceptionType ( Exception $e, $type ) : boolean
$e Exception
$type
return boolean
    protected function isExceptionType(Exception $e, $type)
    {
        do {
            if (is_a($e, $type)) {
                return true;
            }
        } while ($e = $e->getPrevious());
        return false;
    }