diff options
Diffstat (limited to 'dev/lib')
| -rw-r--r-- | dev/lib/core/allocator_system.hpp | 2 | ||||
| -rw-r--r-- | dev/lib/fix/fix.hpp | 6 | ||||
| -rw-r--r-- | dev/lib/logic/opt.hpp | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/dev/lib/core/allocator_system.hpp b/dev/lib/core/allocator_system.hpp index 6fd0119..1873064 100644 --- a/dev/lib/core/allocator_system.hpp +++ b/dev/lib/core/allocator_system.hpp @@ -71,4 +71,4 @@ namespace ocl using standard_allocator_type = allocator_system<type, new_op<type>, delete_op<type>>; } // namespace ocl -#endif // ifndef _OCL_ALLOCATOR_SYSTEM_HPP +#endif // ifndef _OCL_ALLOCATOR_SYSTEM_HPP
\ No newline at end of file diff --git a/dev/lib/fix/fix.hpp b/dev/lib/fix/fix.hpp index 243d01c..ddfd9dc 100644 --- a/dev/lib/fix/fix.hpp +++ b/dev/lib/fix/fix.hpp @@ -1,8 +1,8 @@ /* - * File: fix/parser.hpp + * File: fix/fix.hpp * Purpose: Financial Information Exchange parser in C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss + * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. */ #ifndef _OCL_FIX_PARSER_HPP @@ -212,4 +212,4 @@ namespace ocl::fix using fix_tag_type = std::uint32_t; } // namespace ocl::fix -#endif // ifndef _OCL_FIX_PARSER_HPP +#endif // ifndef _OCL_FIX_PARSER_HPP
\ No newline at end of file diff --git a/dev/lib/logic/opt.hpp b/dev/lib/logic/opt.hpp index 137460c..ceee917 100644 --- a/dev/lib/logic/opt.hpp +++ b/dev/lib/logic/opt.hpp @@ -28,23 +28,23 @@ namespace ocl { } - template <typename ErrorHandler> - opt& try_or_handle(const char_type* input) + opt& expect(const char_type* input) { if (m_ret == return_type::err) { - ErrorHandler handler; - handler(input ? input : ""); + throw std::runtime_error(input ? input : "opt::error"); } return *this; } - opt& try_or_throw(const char_type* input) + template <typename ErrorHandler> + opt& expect_or_handle(const char_type* input) { if (m_ret == return_type::err) { - throw std::runtime_error(input ? input : ""); + ErrorHandler err_handler; + err_handler(input ? input : "opt::error"); } return *this; @@ -131,4 +131,4 @@ namespace ocl } } // namespace ocl -#endif /* ifndef _OCL_OPT_HPP */ +#endif /* ifndef _OCL_OPT_HPP */
\ No newline at end of file |
