22 #include <OnixS/Senaf/MarketData/Export.h> 27 namespace OnixS {
namespace Senaf {
namespace MarketData {
54 static const char* toString(
Enum value);
61 class ONIXS_BME_SENAF_EXPORT
Error :
public std::exception
65 Error(
const std::string& source, ErrorCode code);
68 Error(
const std::string& source, ErrorCode code,
const std::string& description);
74 virtual ~
Error()
throw();
77 ErrorCode code()
const;
80 const char* description()
const;
83 const char* source()
const;
86 virtual const char* what()
const throw();
89 std::string toString()
const;
92 void toString(std::string&)
const;
100 SourceMaxLength = 128
101 , DescriptionMaxLength = 1024
105 char source_[SourceMaxLength];
106 char description_[DescriptionMaxLength];
110 ONIXS_BME_SENAF_EXPORT std::ostream&
operator<<(std::ostream&,
const Error&);
Handler configuration is invalid.
const char * source() const
Origin of the error.
ErrorCode code() const
Code of error.
Enum
List of known errors.
Identifiers errors of generic nature.
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
std::string toString() const
String presentation of an error.
Indicates absence of error.
KnownErrors::Enum ErrorCode
Error code.
const char * description() const
Human readable description of error.
Network packet received by the Handler is corrupted.