diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-21 23:07:20 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-21 23:07:20 +0100 |
commit | 8506d6d27e3b926521007064abcdcc2f69c6aa06 (patch) | |
tree | 4c0207871b3e9a831f8a619ff095ad71adb66f05 /src/Exceptions | |
parent | 740026a9de6cba73c4e77aba78950d0a791b6b62 (diff) |
Refactoring: Config cleanup / moved to class
Diffstat (limited to 'src/Exceptions')
-rw-r--r-- | src/Exceptions/Handler.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Exceptions/Handler.php b/src/Exceptions/Handler.php index a81900b6..0532a7d8 100644 --- a/src/Exceptions/Handler.php +++ b/src/Exceptions/Handler.php @@ -11,7 +11,6 @@ class Handler const ENV_PRODUCTION = 'prod'; const ENV_DEVELOPMENT = 'dev'; - const ENV_DEBUGGING = 'debug'; /** * Handler constructor. @@ -48,7 +47,8 @@ class Handler $e->getCode(), get_class($e) . ': ' . $e->getMessage(), $e->getFile(), - $e->getLine() + $e->getLine(), + ['exception' => $e] ); } @@ -71,13 +71,13 @@ class Handler json_encode($context) )); - if ($this->environment == self::ENV_DEVELOPMENT || $this->environment == self::ENV_DEBUGGING) { + if ($this->environment == self::ENV_DEVELOPMENT) { echo '<pre style="background-color:#333;color:#ccc;z-index:1000;position:fixed;bottom:1em;padding:1em;width:97%;overflow-y:auto;">'; echo sprintf('%s: (%s)' . PHP_EOL, ucfirst($type), $number); var_export([ 'string' => $string, 'file' => $file . ':' . $line, - 'context' => ($this->environment == self::ENV_DEBUGGING ? $context : null), + 'context' => ($this->environment == self::ENV_DEVELOPMENT ? $context : null), ]); echo '</pre>'; die(); |