Skip to content
Snippets Groups Projects
Commit f643cc24 authored by Ere Maijala's avatar Ere Maijala Committed by Demian Katz
Browse files

Make debugging of EDS exceptions easier (#985)

- Use error description as the basic exception message so that it is displayed in the exception view in development mode (i.e. $exception->getMessage() returns something instead of an empty string).
parent 3257829b
No related merge requests found
......@@ -53,7 +53,10 @@ class EbscoEdsApiException extends Exception
{
if (is_array($apiErrorMessage)) {
$this->setApiError($apiErrorMessage);
parent::__construct();
parent::__construct(
isset($this->apiErrorDetails['Description'])
? $this->apiErrorDetails['Description'] : ''
);
} else {
parent::__construct($apiErrorMessage);
}
......@@ -83,7 +86,6 @@ class EbscoEdsApiException extends Exception
$this->apiErrorDetails['Description'] = $message['ErrorDescription'];
$this->apiErrorDetails['DetailedDescription']
= $message['DetailedErrorDescription'];
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment