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