php: force use of global Exception class

This commit is contained in:
Sarah Hoffmann
2021-07-25 16:29:04 +02:00
parent d48793c22c
commit fdff579188
4 changed files with 11 additions and 11 deletions

View File

@@ -22,10 +22,10 @@ class Tokenizer
$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);
}
}

View File

@@ -19,20 +19,20 @@ class Tokenizer
{
$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);
}
}