40 #ifndef _xmlwrapp_errors_h_
41 #define _xmlwrapp_errors_h_
44 #include "xmlwrapp/export.h"
65 class XMLWRAPP_API
exception :
public std::runtime_error
68 explicit exception(
const std::string& what);
90 virtual void on_error(
const std::string& msg) = 0;
93 virtual void on_warning(
const std::string& msg) = 0;
149 : message_(message), type_(msg_type)
156 const std::string&
message()
const {
return message_; }
159 std::string message_;
186 return messages_.empty();
209 std::string print()
const;
214 void on_error(
const std::string& msg);
215 void on_warning(
const std::string& msg);
219 virtual std::string format_for_print(
const error_message& msg)
const;
222 messages_type messages_;
230 #endif // _xmlwrapp_errors_h_