io.vertx.mysqlclient

## Class MySQLException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - io.vertx.mysqlclient.MySQLException

- All Implemented Interfaces:
    Serializable

      public class MySQLException
      extends RuntimeException

  `MySQLException` is the class representing that a MySQL error packet is received from the server, This usually signals that an error occurred during a connection establishment or command executions.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MySQLException(String message, int errorCode, String sqlState)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getErrorCode()` Get the error code in the error message sent from MySQL server.
    `String` | `getMessage()` Get the error message in the error message sent from MySQL server.
    `String` | `getSqlState()` Get the SQL state in the error message sent from MySQL server.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### MySQLException

          public MySQLException(String message,
                                int errorCode,
                                String sqlState)

  - ### Method Detail

    - #### getErrorCode

          public int getErrorCode()

      Get the error code in the error message sent from MySQL server.
      Returns:
        the error code

    - #### getSqlState

          public String getSqlState()

      Get the SQL state in the error message sent from MySQL server.
      Returns:
        the SQL state

    - #### getMessage

          public String getMessage()

      Get the error message in the error message sent from MySQL server.
      Overrides:
        `getMessage` in class `Throwable`
      Returns:
        the error message

Copyright © 2022 Eclipse. All rights reserved.