# `SQLException` Class

__*SQLException*__
__*SQLSTATE*__
__*ErrorCode*__

+ The Java SQLException class represents an error raised when connecting or executing a statement 
  + Java throws an instance when a query or connection attempt in a try block fails SQLException
  + Control is immediately passed to the relevant catch block
+ The SQLException instance provides methods that allow you to check for errors in exceptions
  + `getErrorCode()`: returns the MySQLError code
  + `getSQLState()`: returns SQLSTATE code
  + `getMessage()`: returns text of the error message

------------------------------------------------------------
[no notes]