34 #include <drizzled/error_t.h>
45 Exception(std::string reason, std::string sql_state, drizzled::error_t error_arg) :
46 std::runtime_error(reason),
47 _error_code(error_arg),
48 _sql_state(sql_state),
51 if (_sql_state.length() != 5)
56 std::runtime_error(
"no error"),
57 _error_code(drizzled::EE_OK),
62 Exception(std::string reason, drizzled::error_t error_arg) :
63 std::runtime_error(reason),
64 _error_code(error_arg),
73 drizzled::error_t getErrorCode()
const
78 const std::string &getErrorMessage()
const
85 if (_next_exception.empty())
91 _next_exception.pop();
96 const std::string &getSQLState()
const
110 drizzled::error_t _error_code;
111 std::string _sql_state;
113 mutable std::queue <Exception> _next_exception;
116 std::ostream& operator<<(std::ostream& output,
const Exception &arg);