tess
1.0.0
Performance-first tile and path simulation substrate
Toggle main menu visibility
Loading...
Searching...
No Matches
fail_fast.h
1
#pragma once
2
3
#include <cstdio>
4
#include <cstdlib>
5
6
namespace
tess::detail {
7
8
// The message prints unconditionally. It used to be gated on
9
// TESS_ENABLE_DIAGNOSTICS, which left a release consumer -- the one least
10
// equipped to reproduce the failure under a debugger -- with a bare
11
// abort() and nothing naming what went wrong. Two fputs on a path that is
12
// about to terminate the process buy nothing worth the silence.
13
[[noreturn]]
inline
void
fail_fast(
const
char
* message)
noexcept
{
14
if
(message !=
nullptr
) {
15
std::fputs(
"tess: "
, stderr);
16
std::fputs(message, stderr);
17
std::fputc(
'\n'
, stderr);
18
}
19
std::abort();
20
}
21
22
}
// namespace tess::detail
include
tess
core
fail_fast.h
Generated by
1.17.0