function importException(array $error) {
        $class = $error['class'] ?? null;
        
        if(!isset($this->exceptions[$class])) {
            throw new \BadMethodCallException('Given exception "'.$class.'" is not registered');
        }
        
        return ((array) $this->exceptions[$class]['import'])($error);
    }
function importException(array $error) {
        $class = $error['class'] ?? null;
        
        if(!isset($this->exceptions[$class])) {
            throw new \BadMethodCallException('Given exception "'.$class.'" is not registered');
        }
        
        return ((array) $this->exceptions[$class]['import'])($error);
    }
function importException ( array $ error ) { $ class = $ error [ 'class' ] ?? null ; if ( ! isset ( $ this -> exceptions [ $ class ] ) ) { throw new \ BadMethodCallException ( 'Given exception "' . $ class . '" is not registered' ) ; } return ( ( array ) $ this -> exceptions [ $ class ] [ 'import' ] ) ( $ error ) ; }
Imports the exception.
@param array  $error
@return \Throwable
@throws \BadMethodCallException  Thrown if the exception class is not registered.
Imports the exception .