MySQL 8.3.0
Source Code Documentation
ib::fatal Class Reference

The class fatal is used to emit an error message and stop the server by crashing it. More...

#include <ut0log.h>

Inheritance diagram for ib::fatal:
[legend]

Public Member Functions

 fatal (ut::Location location)
 Default constructor uses ER_IB_MSG_0. More...
 
template<class... Args>
 fatal (ut::Location location, int err, Args &&... args)
 Constructor. More...
 
 ~fatal () override
 Destructor. More...
 
- Public Member Functions inherited from ib::logger
virtual ~logger ()
 Destructor. More...
 
template<class... Args>
loggerlog (int err, Args &&... args)
 Format an error message. More...
 
template<typename T >
loggeroperator<< (const T &rhs)
 
std::ostream & write (const char *buf, std::streamsize count)
 Write the given buffer to the internal string stream object. More...
 
std::ostream & write (const unsigned char *buf, std::streamsize count)
 Write the given buffer to the internal string stream object. More...
 

Private Attributes

ut::Location m_location
 Location of the original caller to report to assertion failure. More...
 

Additional Inherited Members

- Public Attributes inherited from ib::logger
std::ostringstream m_oss
 For converting the message into a string. More...
 
int m_err {}
 Error code in errmsg-*.txt. More...
 
loglevel m_level {INFORMATION_LEVEL}
 Error logging level. More...
 
- Protected Member Functions inherited from ib::logger
void log_event (std::string msg)
 Uses LogEvent to report the log entry, using provided message. More...
 
 logger (loglevel level, int err)
 Constructor. More...
 
template<class... Args>
 logger (loglevel level, int err, Args &&... args)
 Constructor. More...
 
 logger (loglevel level)
 Constructor. More...
 
- Static Protected Member Functions inherited from ib::logger
template<class... Args>
static std::string msg (int err, Args &&... args)
 Format an error message. More...
 

Detailed Description

The class fatal is used to emit an error message and stop the server by crashing it.

Use this class when MySQL server needs to be stopped immediately. Refer to the documentation of class info for usage details.

Constructor & Destructor Documentation

◆ fatal() [1/2]

ib::fatal::fatal ( ut::Location  location)
inline

Default constructor uses ER_IB_MSG_0.

Parameters
[in]locationLocation that creates the fatal message.

◆ fatal() [2/2]

template<class... Args>
ib::fatal::fatal ( ut::Location  location,
int  err,
Args &&...  args 
)
inlineexplicit

Constructor.

Parameters
[in]locationLocation that creates the fatal message.
[in]errError code from errmsg-*.txt.
[in]argsVariable length argument list

◆ ~fatal()

ib::fatal::~fatal ( )
override

Destructor.

Member Data Documentation

◆ m_location

ut::Location ib::fatal::m_location
private

Location of the original caller to report to assertion failure.


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