61 : public virtual common::Printable
62 , internal::Warning_detail
76 Warning(Level level, uint16_t code,
const string &msg)
77 : Warning_detail(byte(level), code, msg)
82 : Warning_detail(std::move(init))
85 void print(std::ostream &out)
const
88 Warning_detail::print(out);
101 return Level(m_level);
124 friend internal::Result_detail;
133void internal::Warning_detail::print(std::ostream &out)
const
135 switch (Warning::Level(m_level))
137 case Warning::LEVEL_ERROR: out <<
"Error";
break;
138 case Warning::LEVEL_WARNING: out <<
"Warning";
break;
139 case Warning::LEVEL_INFO: out <<
"Info";
break;
140 default: out <<
"<Unknown>";
break;
144 out <<
" " << m_code;
146 out <<
": " << m_msg;
An error, warning or other diagnostic information reported by server when executing queries or statem...
Definition: error.h:63
Level
Type of diagnostic information.
Definition: error.h:68
@ LEVEL_WARNING
Warning
Definition: error.h:70
@ LEVEL_ERROR
Error
Definition: error.h:69
const string & getMessage() const
Return diagnostic message reported by server.
Definition: error.h:117
Level getLevel() const
Return level of the diagnostic info stored in this object.
Definition: error.h:99
uint16_t getCode() const
Return error/warning code reported by server.
Definition: error.h:108
Classes used to access query and command execution results.