Coverage for mindsdb / api / executor / exceptions.py: 100%
34 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
1from mindsdb.api.mysql.mysql_proxy.libs.constants.mysql import ERR
4# base exception for unknown error
5class UnknownError(Exception):
6 mysql_error_code = ERR.ER_UNKNOWN_ERROR
7 is_expected = False
10# base exception for known error
11class ExecutorException(Exception):
12 mysql_error_code = ERR.ER_UNKNOWN_ERROR
13 is_expected = False
16class NotSupportedYet(ExecutorException):
17 mysql_error_code = ERR.ER_NOT_SUPPORTED_YET
18 is_expected = True
21class BadDbError(ExecutorException):
22 mysql_error_code = ERR.ER_BAD_DB_ERROR
23 is_expected = True
26class BadTableError(ExecutorException):
27 mysql_error_code = ERR.ER_BAD_DB_ERROR
28 is_expected = True
31class KeyColumnDoesNotExist(ExecutorException):
32 mysql_error_code = ERR.ER_KEY_COLUMN_DOES_NOT_EXIST
33 is_expected = True
36class TableNotExistError(ExecutorException):
37 mysql_error_code = ERR.ER_TABLE_EXISTS_ERROR
38 is_expected = True
41class WrongArgumentError(ExecutorException):
42 mysql_error_code = ERR.ER_WRONG_ARGUMENTS
43 is_expected = True
46class LogicError(ExecutorException):
47 mysql_error_code = ERR.ER_WRONG_USAGE
48 is_expected = True
51class SqlSyntaxError(ExecutorException):
52 err_code = ERR.ER_SYNTAX_ERROR
53 is_expected = True
56class WrongCharsetError(ExecutorException):
57 err_code = ERR.ER_UNKNOWN_CHARACTER_SET
58 is_expected = True