[CONPY-203] Module mariadb.constants.ER for maintaining error codes Created: 2022-05-20  Updated: 2022-07-06  Resolved: 2022-05-25

Status: Closed
Project: MariaDB Connector/Python
Component/s: Generic
Affects Version/s: None
Fix Version/s: 1.1.2

Type: New Feature Priority: Minor
Reporter: Gavin D'souza Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None


 Description   

Being able to handle specific errors is great with the Exception's "errno". It would be a lot neater if there were constants for this instead of numbers - to promote better readability.

```python
try:
documents = domino.get_all("Sales Order")
except OperationalError as err:
if err.errno == ER.LOCK_WAIT_TIMEOUT:
...
logger.exception("Lock wait timeout error ocurred")
```



 Comments   
Comment by Georg Richter [ 2022-05-25 ]

Added in 1.1.0 (1.1 branch)

Generated at Thu Feb 08 03:31:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.