aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/index.php b/index.php
index ea6e8501..1b10ee41 100644
--- a/index.php
+++ b/index.php
@@ -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); 169try {
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}