24 #include <OnixS/Senaf/MarketData/Export.h> 29 namespace OnixS {
namespace Senaf {
namespace MarketData {
56 static const char* toString(
Enum value);
63 class ONIXS_BME_SENAF_EXPORT
Error :
public std::exception
67 Error(
const std::string& source, ErrorCode code);
70 Error(
const std::string& source, ErrorCode code,
const std::string& description);
76 virtual ~
Error()
throw();
79 ErrorCode code()
const;
82 const char* description()
const;
85 const char* source()
const;
88 virtual const char* what()
const throw();
91 std::string toString()
const;
94 void toString(std::string&)
const;
102 SourceMaxLength = 128,
103 DescriptionMaxLength = 1024
107 char source_[SourceMaxLength];
108 char description_[DescriptionMaxLength];
112 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.