diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -151,6 +151,12 @@ $app->group('/api/v1', function () { | |||
151 | $this->get('/history', '\Shaarli\Api\Controllers\HistoryController:getHistory')->setName('getHistory'); | 151 | $this->get('/history', '\Shaarli\Api\Controllers\HistoryController:getHistory')->setName('getHistory'); |
152 | })->add('\Shaarli\Api\ApiMiddleware'); | 152 | })->add('\Shaarli\Api\ApiMiddleware'); |
153 | 153 | ||
154 | $response = $app->run(true); | 154 | try { |
155 | 155 | $response = $app->run(true); | |
156 | $app->respond($response); | 156 | $app->respond($response); |
157 | } catch (Throwable $e) { | ||
158 | die(nl2br( | ||
159 | 'An unexpected error happened, and the error template could not be displayed.' . PHP_EOL . PHP_EOL . | ||
160 | exception2text($e) | ||
161 | )); | ||
162 | } | ||