MySQL 8.4.2
Source Code Documentation
JsonSerializationDefaultErrorHandler Class Referencefinal

Error handler to be used when serializing JSON binary values in server code. More...

#include <json_error_handler.h>

Inheritance diagram for JsonSerializationDefaultErrorHandler:
[legend]

Public Member Functions

 JsonSerializationDefaultErrorHandler (const THD *thd)
 
void KeyTooBig () const override
 Called when a JSON object contains a member with a name that is longer than supported by the JSON binary format. More...
 
void ValueTooBig () const override
 Called when a JSON document is too big to be stored in the JSON binary format. More...
 
void TooDeep () const override
 Called when a JSON document has more nesting levels than supported. More...
 
void InvalidJson () const override
 Called when an invalid JSON value is encountered. More...
 
void InternalError (const char *message) const override
 Called when an internal error occurs. More...
 
bool CheckStack () const override
 Check if the stack is about to be exhausted, and report the error. More...
 
- Public Member Functions inherited from JsonSerializationErrorHandler
virtual ~JsonSerializationErrorHandler ()=default
 

Private Attributes

const THDm_thd
 

Detailed Description

Error handler to be used when serializing JSON binary values in server code.

Uses my_error(), so it cannot be used in code outside of the server.

Constructor & Destructor Documentation

◆ JsonSerializationDefaultErrorHandler()

JsonSerializationDefaultErrorHandler::JsonSerializationDefaultErrorHandler ( const THD thd)
inlineexplicit

Member Function Documentation

◆ CheckStack()

bool JsonSerializationDefaultErrorHandler::CheckStack ( ) const
overridevirtual

Check if the stack is about to be exhausted, and report the error.

Returns
true if the stack is about to be exhausted, false otherwise.

Implements JsonSerializationErrorHandler.

◆ InternalError()

void JsonSerializationDefaultErrorHandler::InternalError ( const char *  message) const
overridevirtual

Called when an internal error occurs.

Implements JsonSerializationErrorHandler.

◆ InvalidJson()

void JsonSerializationDefaultErrorHandler::InvalidJson ( ) const
overridevirtual

Called when an invalid JSON value is encountered.

Implements JsonSerializationErrorHandler.

◆ KeyTooBig()

void JsonSerializationDefaultErrorHandler::KeyTooBig ( ) const
overridevirtual

Called when a JSON object contains a member with a name that is longer than supported by the JSON binary format.

Implements JsonSerializationErrorHandler.

◆ TooDeep()

void JsonSerializationDefaultErrorHandler::TooDeep ( ) const
overridevirtual

Called when a JSON document has more nesting levels than supported.

Implements JsonSerializationErrorHandler.

◆ ValueTooBig()

void JsonSerializationDefaultErrorHandler::ValueTooBig ( ) const
overridevirtual

Called when a JSON document is too big to be stored in the JSON binary format.

Implements JsonSerializationErrorHandler.

Member Data Documentation

◆ m_thd

const THD* JsonSerializationDefaultErrorHandler::m_thd
private

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