join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
sax_error.hpp
Go to the documentation of this file.
1
25#ifndef JOIN_DATA_SAX_ERROR_HPP
26#define JOIN_DATA_SAX_ERROR_HPP
27
28// libjoin.
29#include <join/error.hpp>
30
31// C++.
32#include <system_error>
33#include <string>
34
35namespace join
36{
40 enum class SaxErrc
41 {
42 StackOverflow = 1,
46 ExtraData,
48 };
49
53 class SaxCategory : public std::error_category
54 {
55 public:
60 virtual const char* name () const noexcept;
61
67 virtual std::string message (int code) const;
68 };
69
74 const std::error_category& saxCategory () noexcept;
75
81 std::error_code make_error_code (SaxErrc code) noexcept;
82
88 std::error_condition make_error_condition (SaxErrc code) noexcept;
89}
90
91namespace std
92{
94 template <>
95 struct is_error_condition_enum<join::SaxErrc> : public true_type
96 {
97 };
98}
99
100#endif
SAX API generic error category.
Definition sax_error.hpp:54
virtual std::string message(int code) const
translate SAX API generic error code to human readable error string.
Definition sax_error.cpp:44
virtual const char * name() const noexcept
get SAX API generic error category name.
Definition sax_error.cpp:35
Definition acceptor.hpp:32
const std::error_category & saxCategory() noexcept
get error category.
Definition sax_error.cpp:69
SaxErrc
SAX API generic error codes.
Definition sax_error.hpp:41
std::error_code make_error_code(join::Errc code) noexcept
Create an std::error_code object.
Definition error.cpp:195
std::error_condition make_error_condition(join::Errc code) noexcept
Create an std::error_condition object.
Definition error.cpp:204
Definition error.hpp:144