Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StructuredModelErrorMessage Class Reference

Utility class for Structured Model errors. More...

#include <ored/model/structuredmodelerror.hpp>

+ Inheritance diagram for StructuredModelErrorMessage:
+ Collaboration diagram for StructuredModelErrorMessage:

Public Member Functions

 StructuredModelErrorMessage (const std::string &exceptionType, const std::string &exceptionWhat, const std::string &contextId)
 
- Public Member Functions inherited from StructuredMessage
 StructuredMessage (const Category &category, const Group &group, const std::string &message, const std::map< std::string, std::string > &subFields=std::map< std::string, std::string >())
 
 StructuredMessage (const Category &category, const Group &group, const std::string &message, const std::pair< std::string, std::string > &subField=std::pair< std::string, std::string >())
 
virtual ~StructuredMessage ()
 
std::string msg () const
 return a std::string for the log file More...
 
void emitLog () const
 generate Boost log record to pass to corresponding sinks More...
 
- Public Member Functions inherited from JSONMessage
virtual ~JSONMessage ()
 
virtual std::string msg () const =0
 return a std::string for the log file More...
 
void log () const
 generate Boost log record to pass to corresponding sinks More...
 
const std::string json () const
 create JSON-like output from the data More...
 
void set (const std::string &key, const boost::any &value)
 

Additional Inherited Members

- Public Types inherited from StructuredMessage
enum class  Category { Error , Warning , Unknown }
 
enum class  Group {
  Analytics , Configuration , Model , Curve ,
  Trade , Fixing , Logging , ReferenceData ,
  Unknown
}
 
- Static Public Attributes inherited from StructuredMessage
static constexpr const char * name = "StructuredMessage"
 
- Protected Member Functions inherited from StructuredMessage
void addSubFields (const std::map< std::string, std::string > &)
 
virtual void emitLog () const =0
 generate Boost log record - this method is called by log() More...
 
- Static Protected Member Functions inherited from JSONMessage
static std::string jsonify (const boost::any &)
 
- Protected Attributes inherited from JSONMessage
std::map< std::string, boost::any > data_
 

Detailed Description

Utility class for Structured Model errors.

Definition at line 33 of file structuredmodelerror.hpp.

Constructor & Destructor Documentation

◆ StructuredModelErrorMessage()

StructuredModelErrorMessage ( const std::string &  exceptionType,
const std::string &  exceptionWhat,
const std::string &  contextId 
)

Definition at line 35 of file structuredmodelerror.hpp.

38 Category::Error, Group::Model, exceptionWhat,
39 std::map<std::string, std::string>({{"exceptionType", exceptionType}, {"context-id", contextId}})) {}
StructuredMessage(const Category &category, const Group &group, const std::string &message, const std::map< std::string, std::string > &subFields=std::map< std::string, std::string >())
Definition: log.cpp:555