X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/9d8ee885918f41557094413bb7758e9adee2aa6d..e70dfa18fa10ef220799905cde86fae039a2a75d:/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 "

Bad Request

"; + 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;