Skip to content

Commit

Permalink
Update error mapping (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Jul 17, 2020
1 parent 221d411 commit f75c002
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion pymysql/constants/ER.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

ERROR_FIRST = 1000
HASHCHK = 1000
NISAMCHK = 1001
Expand Down
3 changes: 2 additions & 1 deletion pymysql/err.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def _map_error(exc, *errors):
)
_map_error(DataError, ER.WARN_DATA_TRUNCATED, ER.WARN_NULL_TO_NOTNULL,
ER.WARN_DATA_OUT_OF_RANGE, ER.NO_DEFAULT, ER.PRIMARY_CANT_HAVE_NULL,
ER.DATA_TOO_LONG, ER.DATETIME_FUNCTION_OVERFLOW)
ER.DATA_TOO_LONG, ER.DATETIME_FUNCTION_OVERFLOW, ER.TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER.ILLEGAL_VALUE_FOR_TYPE)
_map_error(IntegrityError, ER.DUP_ENTRY, ER.NO_REFERENCED_ROW,
ER.NO_REFERENCED_ROW_2, ER.ROW_IS_REFERENCED, ER.ROW_IS_REFERENCED_2,
ER.CANNOT_ADD_FOREIGN, ER.BAD_NULL_ERROR)
Expand Down

0 comments on commit f75c002

Please sign in to comment.