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