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;
    }