コード例 #1
0
 public function __construct($query, $bindings = array(), $exception = null)
 {
     if ($exception instanceof OrientException) {
         $message = $this->formatMessage($exception);
         parent::__construct($message);
     } elseif ($exception instanceof \Exception) {
         throw $exception;
     } else {
         parent::__construct($query);
     }
 }
コード例 #2
0
ファイル: QueryException.php プロジェクト: sgpatil/orientdb
 public function __construct($query, $bindings = array(), $exception = null)
 {
     // Let's handle Orientdb exceptions into the QueryException so that we extract
     // relevant info from it and send a helpful decent exception.
     if ($exception instanceof Neo4jException) {
         $message = $this->formatMessage($exception);
         parent::__construct($message);
     } elseif ($exception instanceof \Exception) {
         throw $exception;
     } else {
         parent::__construct($query);
     }
 }