diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -166,6 +166,12 @@ $app->group('/api/v1', function () { | |||
166 | $this->get('/history', '\Shaarli\Api\Controllers\HistoryController:getHistory')->setName('getHistory'); | 166 | $this->get('/history', '\Shaarli\Api\Controllers\HistoryController:getHistory')->setName('getHistory'); |
167 | })->add('\Shaarli\Api\ApiMiddleware'); | 167 | })->add('\Shaarli\Api\ApiMiddleware'); |
168 | 168 | ||
169 | $response = $app->run(true); | 169 | try { |
170 | 170 | $response = $app->run(true); | |
171 | $app->respond($response); | 171 | $app->respond($response); |
172 | } catch (Throwable $e) { | ||
173 | die(nl2br( | ||
174 | 'An unexpected error happened, and the error template could not be displayed.' . PHP_EOL . PHP_EOL . | ||
175 | exception2text($e) | ||
176 | )); | ||
177 | } | ||