1#ifndef JSON_ERROR_HANDLER_INCLUDED
2#define JSON_ERROR_HANDLER_INCLUDED
32 std::function<void(
const char *parse_err,
size_t err_offset)>;
76 void operator()(
const char *parse_err,
size_t err_offset)
const;
Definition: json_error_handler.h:71
const int m_arg_idx
Definition: json_error_handler.h:80
JsonParseDefaultErrorHandler(const char *func_name, int arg_idx)
Definition: json_error_handler.h:73
void operator()(const char *parse_err, size_t err_offset) const
Definition: json_error_handler.cc:31
const char * m_func_name
Definition: json_error_handler.h:79
Error handler to be used when serializing JSON binary values in server code.
Definition: json_error_handler.h:90
void TooDeep() const override
Called when a JSON document has more nesting levels than supported.
Definition: json_error_handler.cc:47
const THD * m_thd
Definition: json_error_handler.h:101
void KeyTooBig() const override
Called when a JSON object contains a member with a name that is longer than supported by the JSON bin...
Definition: json_error_handler.cc:39
void InternalError(const char *message) const override
Called when an internal error occurs.
Definition: json_error_handler.cc:55
void ValueTooBig() const override
Called when a JSON document is too big to be stored in the JSON binary format.
Definition: json_error_handler.cc:43
bool CheckStack() const override
Check if the stack is about to be exhausted, and report the error.
Definition: json_error_handler.cc:60
void InvalidJson() const override
Called when an invalid JSON value is encountered.
Definition: json_error_handler.cc:51
JsonSerializationDefaultErrorHandler(const THD *thd)
Definition: json_error_handler.h:92
Error handler for the functions that serialize a JSON value in the JSON binary storage format.
Definition: json_error_handler.h:43
virtual void InvalidJson() const =0
Called when an invalid JSON value is encountered.
virtual void ValueTooBig() const =0
Called when a JSON document is too big to be stored in the JSON binary format.
virtual bool CheckStack() const =0
Check if the stack is about to be exhausted, and report the error.
virtual void KeyTooBig() const =0
Called when a JSON object contains a member with a name that is longer than supported by the JSON bin...
virtual ~JsonSerializationErrorHandler()=default
virtual void InternalError(const char *message) const =0
Called when an internal error occurs.
virtual void TooDeep() const =0
Called when a JSON document has more nesting levels than supported.
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:35
void JsonDepthErrorHandler()
Definition: json_error_handler.cc:37
std::function< void()> JsonErrorHandler
Definition: json_error_handler.h:33
std::function< void(const char *parse_err, size_t err_offset)> JsonParseErrorHandler
Definition: json_error_handler.h:32