src/ExceptionHandler.php
function exportException(\Throwable $error) {
        $class = \get_class($error);
        
        if(!isset($this->exceptions[$class])) {
            throw new \BadMethodCallException('Given exception "'.$class.'" is not registered');
        }
        
        $export = ((array) $this->exceptions[$class]['export'])($error);
        
        $export['class'] = $class;
        $export['phoebeExceptionHandler'] = true;
        
        return $export;
    }
function exportException(\Throwable $error) {
        $class = \get_class($error);
        
        if(!isset($this->exceptions[$class])) {
            throw new \BadMethodCallException('Given exception "'.$class.'" is not registered');
        }
        
        $export = ((array) $this->exceptions[$class]['export'])($error);
        
        $export['class'] = $class;
        $export['phoebeExceptionHandler'] = true;
        
        return $export;
    }
Exports the exception.
@param \Throwable  $error
@return array
@throws \BadMethodCallException  Thrown if the exception class is not registered.