13 #include <rapidjson/document.h> 27 unsigned int messageCount() {
return m_messages.size(); };
43 bool Log(
const std::string &mainMessage,
bool filterDuplicates =
true);
47 Message(
const std::string& severity,
48 const std::string& message,
49 const std::string& reason,
50 const std::string& exceptionType,
51 const std::string& exceptionMessage,
56 m_exceptionType(exceptionType),
57 m_exceptionMessage(exceptionMessage),
61 std::string getSeverity() {
return m_severity; };
62 std::string
getMessage() {
return m_message; };
63 std::string getReason() {
return m_reason; };
64 std::string getExceptionType() {
return m_exceptionType; };
65 std::string getExceptionMessage() {
return m_exceptionMessage; };
68 std::string m_severity;
69 std::string m_message;
71 std::string m_exceptionType;
72 std::string m_exceptionMessage;
75 std::vector<Message> m_messages;
bool hasMessages()
The error report contains at least one message.
Definition: omferror.h:42
An encapsulation of an error return from an OMF call.
Definition: omferror.h:21
void setFromHttpResponse(const std::string &json)
Parse error information from an OMF POST response JSON document.
Definition: OMFError.cpp:54
int getHttpCode()
Return the most severe HTTP Code from all messages.
Definition: OMFError.cpp:173
std::string getEventSeverity(unsigned int offset)
Get the event severity for a given message.
Definition: OMFError.cpp:228
std::string getEventReason(unsigned int offset)
Return the error reason for the given message.
Definition: OMFError.cpp:211
bool Log(const std::string &mainMessage, bool filterDuplicates=true)
Log all available messages.
Definition: OMFError.cpp:280
std::string getEventExceptionType(unsigned int offset)
Get the event exception type for a given message.
Definition: OMFError.cpp:245
std::string getEventExceptionMessage(unsigned int offset)
Get the event exception message for a given message.
Definition: OMFError.cpp:262
bool hasErrors()
The error report contains at least one error level event.
Definition: omferror.h:38
~OMFError()
Destructor for the error class.
Definition: OMFError.cpp:45
std::string getMessage(unsigned int offset)
Return the error message for the given message.
Definition: OMFError.cpp:194
OMFError()
Constructors.
Definition: OMFError.cpp:33