Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-203

Module mariadb.constants.ER for maintaining error codes

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.2
    • Component/s: Generic
    • 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")
      ```

        Attachments

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            gavin Gavin D'souza
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.