diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-18 07:44:48 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-18 07:55:34 +0100 |
| commit | 9eec329ebdf4cf079619edb58dbcd78ce42b8626 (patch) | |
| tree | b9b6d442f8a92fea4c8943a1504dba105b133596 /dev/examples/fix/fix.cc | |
| parent | ce3ce66e005eb54b315dbc0c78a74e56e2db4191 (diff) | |
feat: lib: error_handler improvements, new method. FIX module improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/examples/fix/fix.cc')
| -rw-r--r-- | dev/examples/fix/fix.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dev/examples/fix/fix.cc b/dev/examples/fix/fix.cc index ec6668a..4015a67 100644 --- a/dev/examples/fix/fix.cc +++ b/dev/examples/fix/fix.cc @@ -4,10 +4,12 @@ licensed under the MIT license */ +#include <lib/core/error_handler.hpp> #include <lib/net/modem.hpp> #include <lib/fix/fix.hpp> #include <iostream> #include <unistd.h> +#include <lib/io/print.hpp> #include <sys/socket.h> /* finally test it */ @@ -22,12 +24,13 @@ int main(int argc, char** argv) std::cout << "magic_len=" << fix.magic_len_ << std::endl; std::cout << "is_valid=" << std::boolalpha << fix.is_valid() << std::endl; - ocl::fix::must_pass(fix); + ocl::basic_error_handler handler; + ocl::fix::must_pass<char, ocl::basic_error_handler>(fix, handler); for (auto fields : fix.body_) { - std::cout << "key=" << fields.first; - std::cout << ":value=" << fields.second << std::endl; + ocl::io::print("key=", fields.first); + ocl::io::print(", value=", fields.second); } return 0; |
