24#include <unordered_map>
26#include <drizzled/common_fwd.h>
28#include <drizzled/error/priority_t.h>
29#include <drizzled/error_t.h>
30#include <drizzled/identifier.h>
33#include <boost/noncopyable.hpp>
39 size_t operator()(drizzled::error_t v)
const
41 return static_cast<size_t>(v);
49#define SC_MAXWIDTH 256
50#define ERRMSGSIZE (SC_MAXWIDTH)
51#define MY_FILE_ERROR ((size_t) -1)
52#define ME_FATALERROR 1024
57class ErrorMap : boost::noncopyable
60 typedef std::pair<std::string, std::string> value_type;
61 typedef std::unordered_map<error_t, value_type> ErrorMessageMap;
67 void add(error_t error_num,
const std::string &error_name,
const std::string &message);
69 const std::string* find(error_t error_num)
const;
71 static const ErrorMessageMap& get_error_message_map();
73 ErrorMessageMap mapping_;
76typedef void (*error_handler_func)(error_t my_err,
79extern error_handler_func error_handler_hook;
83DRIZZLED_API const char * error_message(error_t err_index);
86void add_error_message(error_t error_code,
const std::string &error_name,
87 const std::string& message);
88#define DRIZZLE_ADD_ERROR_MESSAGE(code, msg) add_error_message(code, STRINGIFY_ARG(code), msg)
96const std::string &verbose_string();
97error::priority_t &verbosity();
98void check_verbosity(
const std::string &arg);
103DRIZZLED_API void my_error(
const std::string &ref, error_t nr, myf MyFlags= MYF(0));
104DRIZZLED_API void my_error(error_t nr,
const Identifier&, myf MyFlags= MYF(0));
106DRIZZLED_API void my_error(error_t nr, myf MyFlags, ...);
107void my_message(error_t my_err,
const char *str, myf MyFlags);
108void my_printf_error(error_t my_err,
const char *format,
110 __attribute__((format(printf, 2, 4)));
A set of Session members describing the current authenticated user.
TODO: Rename this file - func.h is stupid.
Visibility Control Macros.