diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2021-07-22 16:07:19 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2021-07-22 16:19:12 +0200 |
| commit | a3da1483a9e689846179159355badfec8073dbec (patch) | |
| tree | 770dcca6bdf5f6f2a11b0e7fcbbeda6919a3fc52 /templates/json_exception.php | |
current code from svn, revision 62608
Diffstat (limited to 'templates/json_exception.php')
| -rw-r--r-- | templates/json_exception.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/json_exception.php b/templates/json_exception.php new file mode 100644 index 0000000..7e96f1d --- /dev/null +++ b/templates/json_exception.php @@ -0,0 +1,14 @@ +<? if (Studip\ENV === 'development'): ?> +<?= json_encode([ + 'status' => (int) $status, + 'message' => $exception->getMessage(), + 'file' => $exception->getFile(), + 'line' => $exception->getLine(), + 'trace' => explode("\n", $exception->getTraceAsString()), +]) ?> +<? else: ?> +<?= json_encode([ + 'status' => (int) $status, + 'message' => $exception->getMessage(), + ]) ?> +<? endif; ?> |
