openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 0acd866e242a2ba938069ff0b680d25dcf0486b9
parent 6c0f21e68f6b53c91e975227528ec7eb786fcbfc
Author: Jan Dankert <devnull@localhost>
Date:   Wed,  4 Jul 2018 01:10:08 +0200

Exceptions vollständig ausgeben.

Diffstat:
modules/cms-api/API.class.php | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/cms-api/API.class.php b/modules/cms-api/API.class.php @@ -49,16 +49,16 @@ class API API::sendHTTPStatus(500, 'Object not found'); $data = array('status' => 500, 'error' => 'Object not found', 'description' => $e->getMessage(), 'reason' => $e->getCode()); } catch (OpenRatException $e) { + Logger::warn($e->__toString()); API::sendHTTPStatus(500, 'Internal CMS Error'); $data = array('status' => 500, 'error' => 'Internal CMS error', 'description' => $e->getMessage(), 'reason' => $e->getCode()); } catch (SecurityException $e) { - Logger::info('API request not allowed: ' . $e->getMessage()); API::sendHTTPStatus(403, 'Forbidden'); $data = array('status' => 403, 'error' => 'You are not allowed to execute this action.', 'description' => $e->getMessage(), 'reason' => $e->getCode()); } catch (Exception $e) { - + Logger::warn($e->__toString()); API::sendHTTPStatus(500, 'Internal Server Error'); $data = array('status' => 500, 'error' => 'Internal CMS error', 'description' => $e->getMessage(), 'reason' => $e->getCode()); }