示例#1
0
文件: Toolbox.php 项目: f21/paradox
 /**
  * Normalises the exceptions thrown by ArangoDB-PHP.
  * @param  \Exception $exception
  * @return array
  */
 public function normaliseDriverExceptions(\Exception $exception)
 {
     if ($exception instanceof \triagens\ArangoDb\ServerException) {
         return array('message' => $exception->getServerMessage(), 'code' => $exception->getServerCode());
     } else {
         return array('message' => $exception->getMessage(), 'code' => $exception->getCode());
     }
 }