MySQL 9.1.0
Source Code Documentation
error_names.cc File Reference

Functions

int get_errcode_from_name (std::string error_name)
 Get an error code from an error name string. More...
 
const char * get_errname_from_code (int error_code)
 Get an error name from an error code. More...
 

Variables

static st_error global_error_names []
 

Function Documentation

◆ get_errcode_from_name()

int get_errcode_from_name ( std::string  error_name)

Get an error code from an error name string.

Parameters
error_nameError name string
Return values
-1if error name is unknown, error code otherwise.

◆ get_errname_from_code()

const char * get_errname_from_code ( int  error_code)

Get an error name from an error code.

Parameters
error_codeError code
Return values
<Unknown>keyword if error code is unknown, error name otherwise.

Variable Documentation

◆ global_error_names

st_error global_error_names[]
static
Initial value:
= {
{"<No error>", static_cast<int>(-1), "", nullptr, nullptr, 0},
{nullptr, 0, nullptr, nullptr, nullptr, 0}}