MySQL 9.1.0
Source Code Documentation
|
This file declares functions to convert exceptions to MySQL error messages. More...
Go to the source code of this file.
Functions | |
void | handle_std_exception (const char *funcname) |
Handle an exception of any type. More... | |
void | handle_gis_exception (const char *funcname) |
Handle a GIS exception of any type. More... | |
This file declares functions to convert exceptions to MySQL error messages.
The pattern for use in other functions is:
There are different handlers for different use cases.
void handle_gis_exception | ( | const char * | funcname | ) |
Handle a GIS exception of any type.
This function constitutes the exception handling barrier between Boost.Geometry and MySQL code. It handles all exceptions thrown in GIS code and raises the corresponding error in MySQL.
Pattern for use in other functions:
Other exception handling code put into the catch block, before or after the call to handle_gis_exception(), must not throw exceptions.
funcname | Function name for use in error message |
void handle_std_exception | ( | const char * | funcname | ) |
Handle an exception of any type.
Code that could throw exceptions should be wrapped in try/catch, and the catch block should raise a corresponding MySQL error. If this function is called from the catch block, it will raise a specialized error message for many of the std::exception subclasses, or a more generic error message if it is not a std::exception.
funcname | the name of the function that caught an exception |