File tree Expand file tree Collapse file tree
components/core/src/clp/ffi/ir_stream/search Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #include " QueryHandlerErrorCode.hpp"
2+
3+ #include < ystdlib/error_handling/ErrorCode.hpp>
4+
5+ using clp::ffi::ir_stream::search::QueryHandlerErrorCodeEnum;
6+ using QueryHandlerErrorCategory = ystdlib::error_handling::ErrorCategory<QueryHandlerErrorCodeEnum>;
7+
8+ template <>
9+ auto QueryHandlerErrorCategory::name () const noexcept -> char const * {
10+ return " clp::ffi::ir_stream::search::QueryHandlerError" ;
11+ }
12+
13+ template <>
14+ auto QueryHandlerErrorCategory::message (QueryHandlerErrorCodeEnum error_enum) const -> std::string {
15+ switch (error_enum) {
16+ case QueryHandlerErrorCodeEnum::MethodNotImplemented:
17+ return " The requested method is not implemented." ;
18+ default :
19+ return " Unknown error code enum." ;
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ #ifndef CLP_FFI_IR_STREAM_SEARCH_QUERYHANDLERERRORCODE_HPP
2+ #define CLP_FFI_IR_STREAM_SEARCH_QUERYHANDLERERRORCODE_HPP
3+
4+ #include < cstdint>
5+
6+ #include < ystdlib/error_handling/ErrorCode.hpp>
7+
8+ namespace clp ::ffi::ir_stream::search {
9+ /* *
10+ * This enum class represents all possible error codes related to query handler.
11+ */
12+ enum class QueryHandlerErrorCodeEnum : uint8_t {
13+ MethodNotImplemented,
14+ };
15+
16+ using QueryHandlerErrorCode = ystdlib::error_handling::ErrorCode<QueryHandlerErrorCodeEnum>;
17+ } // namespace clp::ffi::ir_stream::search
18+
19+ YSTDLIB_ERROR_HANDLING_MARK_AS_ERROR_CODE_ENUM (
20+ clp::ffi::ir_stream::search::QueryHandlerErrorCodeEnum
21+ );
22+
23+ #endif // CLP_FFI_IR_STREAM_SEARCH_QUERYHANDLERERRORCODE_HPP
You can’t perform that action at this time.
0 commit comments