public function errorInfo(){
        if ($this->getConnection() instanceof PDO) {
            $message = isset($this->connection->errorInfo()['message']) ? $this->getConnection()->errorInfo()['message'] : 'Something Went Wrong!';
        } elseif ($this->getConnection() instanceof mysqli) {
            $message = $this->getConnection()->error;
        }

        return $message;
    }