]> git.openstreetmap.org Git - nominatim.git/blob - lib-php/template/error-json.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib-php / template / error-json.php
1 <?php
2 /**
3  * SPDX-License-Identifier: GPL-2.0-only
4  *
5  * This file is part of Nominatim. (https://nominatim.org)
6  *
7  * Copyright (C) 2022 by the Nominatim developer community.
8  * For a full list of authors see the git log.
9  */
10     $error = array(
11               'code' => $exception->getCode(),
12               'message' => $exception->getMessage()
13              );
14
15     if (CONST_Debug) {
16         $error['details'] = $exception->getFile() . '('. $exception->getLine() . ')';
17     }
18
19     javascript_renderData(array('error' => $error));