Skip to content

Commit

Permalink
Refactor/use from to json (#469)
Browse files Browse the repository at this point in the history
* Use native json conversion functions

---------

Signed-off-by: Andreas Heinrich <[email protected]>
Co-authored-by: Kai Hermann <[email protected]>
  • Loading branch information
andistorm and hikinggrass authored Apr 15, 2024
1 parent 7480d34 commit 1b49482
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
everest-framework:
git: https://github.com/EVerest/everest-framework.git
git_tag: v0.11.0
git_tag: v0.12.0
options: ["BUILD_TESTING OFF"]
sigslot:
git: https://github.com/palacaze/sigslot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,39 @@ namespace main {
void test_error_handlingImpl::init() {
this->mod->r_error_raiser->subscribe_error_test_errors_TestErrorA(
[this](const Everest::error::Error& error) {
EVLOG_debug << fmt::format("received error: {}", Everest::error::error_to_json(error).dump(2));
this->publish_errors_subscribe_TestErrorA(Everest::error::error_to_json(error));
EVLOG_debug << fmt::format("received error: {}", json(error).dump(2));
this->publish_errors_subscribe_TestErrorA(json(error));
},
[this](const Everest::error::Error& error) {
EVLOG_debug << fmt::format("received error: {}", Everest::error::error_to_json(error).dump(2));
this->publish_errors_cleared_subscribe_TestErrorA(Everest::error::error_to_json(error));
EVLOG_debug << fmt::format("received error: {}", json(error).dump(2));
this->publish_errors_cleared_subscribe_TestErrorA(json(error));
});
this->mod->r_error_raiser->subscribe_error_test_errors_TestErrorB(
[this](const Everest::error::Error& error) {
EVLOG_debug << fmt::format("received error: {}", Everest::error::error_to_json(error).dump(2));
this->publish_errors_subscribe_TestErrorB(Everest::error::error_to_json(error));
EVLOG_debug << fmt::format("received error: {}", json(error).dump(2));
this->publish_errors_subscribe_TestErrorB(json(error));
},
[this](const Everest::error::Error& error) {
EVLOG_debug << fmt::format("received error: {}", Everest::error::error_to_json(error).dump(2));
this->publish_errors_cleared_subscribe_TestErrorB(Everest::error::error_to_json(error));
EVLOG_debug << fmt::format("received error: {}", json(error).dump(2));
this->publish_errors_cleared_subscribe_TestErrorB(json(error));
});
this->mod->r_error_raiser->subscribe_all_errors(
[this](const Everest::error::Error& error) {
EVLOG_debug << fmt::format("received error: {}", Everest::error::error_to_json(error).dump(2));
this->publish_errors_subscribe_all(Everest::error::error_to_json(error));
EVLOG_debug << fmt::format("received error: {}", json(error).dump(2));
this->publish_errors_subscribe_all(json(error));
},
[this](const Everest::error::Error& error) {
EVLOG_debug << fmt::format("received error: {}", Everest::error::error_to_json(error).dump(2));
this->publish_errors_cleared_subscribe_all(Everest::error::error_to_json(error));
EVLOG_debug << fmt::format("received error: {}", json(error).dump(2));
this->publish_errors_cleared_subscribe_all(json(error));
});
subscribe_global_all_errors(
[this](const Everest::error::Error& error) {
EVLOG_debug << fmt::format("received error: {}", Everest::error::error_to_json(error).dump(2));
this->publish_errors_subscribe_global_all(Everest::error::error_to_json(error));
EVLOG_debug << fmt::format("received error: {}", json(error).dump(2));
this->publish_errors_subscribe_global_all(json(error));
},
[this](const Everest::error::Error& error) {
EVLOG_debug << fmt::format("received error: {}", Everest::error::error_to_json(error).dump(2));
this->publish_errors_cleared_subscribe_global_all(Everest::error::error_to_json(error));
EVLOG_debug << fmt::format("received error: {}", json(error).dump(2));
this->publish_errors_cleared_subscribe_global_all(json(error));
});
}

Expand Down

0 comments on commit 1b49482

Please sign in to comment.