Skip to content

Commit

Permalink
pw_assert_tokenized: Support pw_assert_HandleFailure
Browse files Browse the repository at this point in the history
Change-Id: Ibaf22f5b72c4d20260f921910811b5148fceb6bc
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/244793
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Pigweed-Auto-Submit: Ben Lawson <benlawson@google.com>
Docs-Not-Needed: Ben Lawson <benlawson@google.com>
  • Loading branch information
BenjaminLawson authored and CQ Bot Account committed Oct 28, 2024
1 parent 099eb1c commit ef5f6bf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pw_assert_tokenized/log_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@
#include "pw_log_tokenized/metadata.h"
#include "pw_span/span.h"

extern "C" void pw_assert_HandleFailure(void) {
PW_HANDLE_LOG(PW_LOG_LEVEL_FATAL,
"pw_assert_tokenized",
PW_LOG_FLAGS,
#if PW_ASSERT_ENABLE_DEBUG
"PW_ASSERT() or PW_DASSERT() failure");
#else
"PW_ASSERT() failure. Note: PW_DASSERT disabled");
#endif // PW_ASSERT_ENABLE_DEBUG
PW_UNREACHABLE;
}

extern "C" void pw_assert_tokenized_HandleAssertFailure(
uint32_t tokenized_file_name, int line_number) {
// Buffer size for binary->base64 conversion with a null terminator.
Expand Down

0 comments on commit ef5f6bf

Please sign in to comment.