MySQLiクラスを拡張するカスタムデータベースクラスがあります。
parentメソッドでを使用してデータベースに接続します__construct。
以下は、クエリが成功しなかった場合のクエリの部分です。サーバーからエラーを返すにはどうすればよいですか?
$query =  parent::query($querystr, $resultmode);
    if (!$query) {
        $error = str_replace(
            'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use',
            'Syntax Error',
            mysqli_error(self::getInstance()));
        \core\debug::sqlerrorlog($error);
    } else {
        \core\debug::sqlSuccess();
    }