Skip to content

Commit

Permalink
Don't hard-code stdout_print in terminate_with()
Browse files Browse the repository at this point in the history
  • Loading branch information
cschreib committed May 2, 2024
1 parent 81cce09 commit 64b4b13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/snitch_error_handling.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "snitch/snitch_error_handling.hpp"

#include "snitch/snitch_console.hpp"
#include "snitch/snitch_cli.hpp"

#include <exception> // for std::terminate

namespace snitch {
[[noreturn]] void terminate_with(std::string_view msg) noexcept {
impl::stdout_print("terminate called with message: ");
impl::stdout_print(msg);
impl::stdout_print("\n");
cli::console_print("terminate called with message: ");
cli::console_print(msg);
cli::console_print("\n");

Check warning on line 11 in src/snitch_error_handling.cpp

View check run for this annotation

Codecov / codecov/patch

src/snitch_error_handling.cpp#L9-L11

Added lines #L9 - L11 were not covered by tests

std::terminate();
}
Expand Down

0 comments on commit 64b4b13

Please sign in to comment.