diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-17 15:21:56 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-23 10:57:21 +0100 |
commit | 2a38605545e26ce68a37e5ebb877fd9c9875a37d (patch) | |
tree | a149433f3fdeae3b4615061b495e4c523328a9a6 /apps/files_sharing/lib/Controller/ShareAPIController.php | |
parent | 520f2fd6ea3661d5d49517c7265dd8d7515036ac (diff) | |
download | nextcloud-server-2a38605545e26ce68a37e5ebb877fd9c9875a37d.tar.gz nextcloud-server-2a38605545e26ce68a37e5ebb877fd9c9875a37d.zip |
Properly log the full exception instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareAPIController.php')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 10876e16568..990571b778f 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -482,7 +482,7 @@ class ShareAPIController extends OCSController { $code = $e->getCode() === 0 ? 403 : $e->getCode(); throw new OCSException($e->getHint(), $code); } catch (\Exception $e) { - throw new OCSForbiddenException($e->getMessage()); + throw new OCSForbiddenException($e->getMessage(), $e); } $output = $this->formatShare($share); @@ -749,7 +749,7 @@ class ShareAPIController extends OCSController { try { $expireDate = $this->parseDate($expireDate); } catch (\Exception $e) { - throw new OCSBadRequestException($e->getMessage()); + throw new OCSBadRequestException($e->getMessage(), $e); } $share->setExpirationDate($expireDate); } @@ -780,7 +780,7 @@ class ShareAPIController extends OCSController { try { $expireDate = $this->parseDate($expireDate); } catch (\Exception $e) { - throw new OCSBadRequestException($e->getMessage()); + throw new OCSBadRequestException($e->getMessage(), $e); } $share->setExpirationDate($expireDate); } @@ -809,7 +809,7 @@ class ShareAPIController extends OCSController { try { $share = $this->shareManager->updateShare($share); } catch (\Exception $e) { - throw new OCSBadRequestException($e->getMessage()); + throw new OCSBadRequestException($e->getMessage(), $e); } return new DataResponse($this->formatShare($share)); |