diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-07-02 07:37:00 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-07-02 07:37:00 +0400 |
commit | 6ba4a06f33fcb818df3751c3ea6323ad391d82ea (patch) | |
tree | 630db684a2e9982b152d61748248076a18208ebe /core/Development.php | |
parent | 153a9c85e6a85d9b03abf9a58f8648e53f5ea8c5 (diff) |
a few more tweaks
Diffstat (limited to 'core/Development.php')
-rw-r--r-- | core/Development.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/core/Development.php b/core/Development.php index e9b64f4e82..c0d34f11e9 100644 --- a/core/Development.php +++ b/core/Development.php @@ -79,7 +79,18 @@ class Development public static function error($message) { - $message .= ' (This error is only triggered in development mode. Your plugin still works when development mode is disabled but will lead in an error at some point. We highly recommend to fix this issue!)'; - throw new Exception($message); + if (!self::isEnabled()) { + return; + } + + $message .= ' (This error is only shown in development mode)'; + + if (SettingsServer::isTrackerApiRequest() + || Common::isPhpCliMode()) { + Log::error($message); + } else { + throw new Exception($message); + } + } } |