Skip to content

Commit

Permalink
Attach error details.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Mar 14, 2014
1 parent 78dd1b0 commit ae35fe0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion framework/OpenXchange/lib/Horde/OpenXchange/Base.php
Expand Up @@ -206,7 +206,9 @@ protected function _request($method, $namespace, $params, $data = array())
throw new Horde_OpenXchange_Exception($body);
}
if (isset($data['error'])) {
throw new Horde_OpenXchange_Exception($data['error']);
$e = new Horde_OpenXchange_Exception($data['error']);
$e->details = $data;
throw $e;
}
return $data;
} catch (Horde_Http_Exception $e) {
Expand Down

0 comments on commit ae35fe0

Please sign in to comment.