Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
Panic.hpp File Reference

Zero-heap assertion and panic handling utilities. More...

#include <cstdio>
#include <cstdlib>
+ Include dependency graph for Panic.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  corium
 
namespace  corium::internal
 

Macros

#define CORIUM_ASSERT(cond, msg)
 
#define CORIUM_PANIC(msg)   ::corium::internal::panic(__FILE__, __LINE__, msg)
 

Typedefs

using corium::PanicHandlerFn = void(*)(const char *file, int line, const char *message) noexcept
 Signature of the custom bare-metal panic handler callback.
 

Functions

PanicHandlerFncorium::internal::getPanicHandler () noexcept
 
void corium::internal::panic (const char *file, int line, const char *message) noexcept
 
void corium::setPanicHandler (PanicHandlerFn fn) noexcept
 Configure the global bare-metal panic handler hook (e.g. for Hardware Fault logging).
 

Detailed Description

Zero-heap assertion and panic handling utilities.

Macro Definition Documentation

◆ CORIUM_ASSERT

#define CORIUM_ASSERT (   cond,
  msg 
)
Value:
do { \
if (!(cond)) [[unlikely]] { \
::corium::internal::panic(__FILE__, __LINE__, msg); \
} \
} while (0)

◆ CORIUM_PANIC

#define CORIUM_PANIC (   msg)    ::corium::internal::panic(__FILE__, __LINE__, msg)