X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a0e39b67d5d3ad52afbc3dd33ebc5c754ad9092a..77bbbd24983356f388d1ae1ad2dc44a8472c3ce2:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index 8a491818..f34b09b7 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -25,6 +25,19 @@ } + function userError($sError) + { + header('HTTP/1.0 400 Bad Request'); + header('Content-type: text/html; charset=utf-8'); + echo "
Nominatim has encountered an error with your request.
'; + echo "Details: ".$sError,"
"; + echo 'If you feel this error is incorrect feel free to report the bug in the OSM bug database. Please include the error message above and the URL you used.
'; + echo "\n\n"; + exit; + + } + function fail($sError, $sUserError = false) { if (!$sUserError) $sUserError = $sError;