function userError($sMsg)
{
- throw new Exception($sMsg, 400);
+ throw new \Exception($sMsg, 400);
}
{
$error = error_get_last();
if ($error !== null && $error['type'] === E_ERROR) {
- exception_handler_xml(new Exception($error['message'], 500));
+ exception_handler_xml(new \Exception($error['message'], 500));
}
}
{
$error = error_get_last();
if ($error !== null && $error['type'] === E_ERROR) {
- exception_handler_json(new Exception($error['message'], 500));
+ exception_handler_json(new \Exception($error['message'], 500));
}
}
$sSQL = 'SELECT word_id FROM word limit 1';
$iWordID = $this->oDB->getOne($sSQL);
if ($iWordID === false) {
- throw new Exception('Query failed', 703);
+ throw new \Exception('Query failed', 703);
}
if (!$iWordID) {
- throw new Exception('No value', 704);
+ throw new \Exception('No value', 704);
}
}
{
$sStandardWord = $this->oDB->getOne("SELECT make_standard_name('a')");
if ($sStandardWord === false) {
- throw new Exception('Module failed', 701);
+ throw new \Exception('Module failed', 701);
}
if ($sStandardWord != 'a') {
- throw new Exception('Module call failed', 702);
+ throw new \Exception('Module call failed', 702);
}
$sSQL = "SELECT word_id FROM word WHERE word_token IN (' a')";
$iWordID = $this->oDB->getOne($sSQL);
if ($iWordID === false) {
- throw new Exception('Query failed', 703);
+ throw new \Exception('Query failed', 703);
}
if (!$iWordID) {
- throw new Exception('No value', 704);
+ throw new \Exception('No value', 704);
}
}
}
if ($sPlaceId === false) {
- throw new Exception('No place with that OSM ID found.', 404);
+ throw new \Exception('No place with that OSM ID found.', 404);
}
} else {
if ($sPlaceId === false) {
$aPointDetails = $oDB->getRow($sSQL, null, 'Could not get details of place object.');
if (!$aPointDetails) {
- throw new Exception('No place with that place ID found.', 404);
+ throw new \Exception('No place with that place ID found.', 404);
}
$aPointDetails['localname'] = $aPointDetails['localname']?$aPointDetails['localname']:$aPointDetails['housenumber'];