00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #include <drizzled/plugin/plugin.h>
00025 #include <drizzled/error/priority_t.h>
00026
00027 #include <stdarg.h>
00028
00029 #include <string>
00030
00031 #include <drizzled/visibility.h>
00032
00033 namespace drizzled
00034 {
00035
00036 namespace plugin
00037 {
00038
00039 class DRIZZLED_API ErrorMessage : public Plugin
00040 {
00041 public:
00042 explicit ErrorMessage(std::string name_arg)
00043 : Plugin(name_arg, "ErrorMessage")
00044 {}
00045
00046 virtual bool errmsg(error::priority_t priority, const char *format, va_list ap)=0;
00047
00048 static bool addPlugin(plugin::ErrorMessage *handler);
00049 static void removePlugin(plugin::ErrorMessage *handler);
00050
00051 static bool vprintf(error::priority_t priority, char const *format, va_list ap);
00052
00053 bool removeLast() const
00054 {
00055 return true;
00056 }
00057 };
00058
00059 }
00060 }
00061