MySQL 9.0.0
Source Code Documentation
Error Class Reference

Class representing an error. More...

#include <error.h>

Public Member Functions

 Error (std::uint32_t error_code, const char *sqlstate, error_type type)
 
const char * sqlstate ()
 Return a sqlstate for an error. More...
 
std::uint32_t error_code ()
 Return an error code. More...
 
error_type type ()
 Return an error type. More...
 

Private Attributes

std::uint32_t m_error_code
 
error_type m_type
 
char m_sqlstate [SQLSTATE_LENGTH+1]
 

Detailed Description

Class representing an error.

Contains following information

  • Error code
  • Error type
  • SQLSTATE

If an error type value is

  • ERR_ERRNO, then SQLSTATE value is "00000"
  • ERR_SQLSTATE, then error code value is 0

Constructor & Destructor Documentation

◆ Error()

Error::Error ( std::uint32_t  error_code,
const char *  sqlstate,
error_type  type 
)
inline

Member Function Documentation

◆ error_code()

std::uint32_t Error::error_code ( )
inline

Return an error code.

Return values
Errorcode

◆ sqlstate()

const char * Error::sqlstate ( )
inline

Return a sqlstate for an error.

Return values
SQLSTATEstring

◆ type()

error_type Error::type ( )
inline

Return an error type.

Return values
Errortype (ERR_ERRNO or ERR_SQLSTATE)

Member Data Documentation

◆ m_error_code

std::uint32_t Error::m_error_code
private

◆ m_sqlstate

char Error::m_sqlstate[SQLSTATE_LENGTH+1]
private

◆ m_type

error_type Error::m_type
private

The documentation for this class was generated from the following file: