blob: 46ae933d5211e0b33b0c7e2c1dbda7d2f650a5c1 [file] [log] [blame]
// Copyright 2022 The Pigweed Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
#pragma once
#include "pw_assert_tokenized/handler.h"
#include "pw_tokenizer/tokenize.h"
// The tokens generated by this expression are not stored in the ELF in a way
// that the pw_tokenizer tooling can extract. Tokenized file names must be
// generated offline separately.
#define PW_ASSERT_HANDLE_FAILURE(expression) \
pw_assert_tokenized_HandleAssertFailure(PW_TOKENIZER_STRING_TOKEN(__FILE__), \
__LINE__)