public function PDOException($error)
 {
     self::$error = true;
     if (is_object($error)) {
         $e = $error->errorInfo();
         $e = $e[2];
         throw new Exception($e);
     } else {
         if (is_string($error)) {
             $e = $error;
             throw new Exception($e, 1);
         } else {
             throw new Exception($e, 1);
         }
     }
 }