]> git.openstreetmap.org Git - nominatim.git/blob - lib/template/error-json.php
set exception handler by request format, not always HTML
[nominatim.git] / lib / template / error-json.php
1 <?php
2     $error = array(
3               'code' => $exception->getCode(),
4               'message' => $exception->getMessage()
5     );
6
7     if (CONST_Debug) {
8         $error['details'] = $exception->getFile() . '('. $exception->getLine() . ')';
9     }
10
11     echo javascript_renderData(array('error' => $error));