* Add throwError flag for throw exception with sql error.

This commit is contained in:
qixinzhi
2023-11-14 14:37:45 +08:00
parent e95ada9d53
commit ae917db86b
+6 -1
View File
@@ -1479,7 +1479,12 @@ class baseDAO
$message .= ' ' . helper::checkDB2Repair($exception);
$sql = $this->sqlobj->get();
$this->app->triggerError($message . "<p>The sql is: $sql</p>", __FILE__, __LINE__, $exit = true);
$message .= "<p>The sql is: $sql</p>";
if($this->app->throwError)
{
return throw new Exception($message);
}
$this->app->triggerError($message, __FILE__, __LINE__, $exit = true);
}
}