Sen API
Sen Libraries
Toggle main menu visibility
Loading...
Searching...
No Matches
assert.h
Go to the documentation of this file.
1
// === assert.h ========================================================================================================
2
// Sen Infrastructure
3
// Released under the Apache License v2.0 (SPDX-License-Identifier Apache-2.0).
4
// See the LICENSE.txt file for more information.
5
// © Airbus SAS, Airbus Helicopters, and Airbus Defence and Space SAU/GmbH/SAS.
6
// =====================================================================================================================
7
8
#ifndef SEN_CORE_BASE_ASSERT_H
9
#define SEN_CORE_BASE_ASSERT_H
10
11
#include "
sen/core/base/detail/assert_impl.h
"
12
13
// std
14
#include <string>
15
16
namespace
sen
17
{
18
31
34
36
#define SEN_EXPECT(expr) ::sen::impl::senCheckImpl((expr), ::sen::impl::CheckType::expect, #expr, SEN_SL())
37
39
#define SEN_ASSERT(expr) ::sen::impl::senCheckImpl((expr), ::sen::impl::CheckType::assert, #expr, SEN_SL())
40
42
#if defined(DEBUG)
43
# define SEN_DEBUG_ASSERT(expr) ::sen::impl::senCheckImpl((expr), ::sen::impl::CheckType::assert, #expr, SEN_SL())
44
#else
45
# define SEN_DEBUG_ASSERT(expr)
46
#endif
47
49
#define SEN_ENSURE(expr) ::sen::impl::senCheckImpl((expr), ::sen::impl::CheckType::ensure, #expr, SEN_SL())
50
52
void
registerTerminateHandler
();
53
55
[[noreturn]]
void
throwRuntimeError
(
const
std::string& err);
56
58
void
trace
();
59
63
void
trace
(std::string preMessage);
64
66
67
}
// namespace sen
68
69
#endif
// SEN_CORE_BASE_ASSERT_H
assert_impl.h
sen::throwRuntimeError
void throwRuntimeError(const std::string &err)
Throws std::exception that attempts to collect the stack trace. We also wrap it to avoid including st...
sen::registerTerminateHandler
void registerTerminateHandler()
Installs a custom termination handler.
sen::trace
void trace()
Prints the current stack trace to stderr.
sen
Definition
assert.h:17
libs
core
include
sen
core
base
assert.h
Generated by
1.17.0