blob: 23bbb73f9e300bd6c9094b0b30cc8f4ea990d467 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#pragma once
#include <cstdarg>
#include "WAVM/Platform/Diagnostics.h"
namespace WAVM { namespace Errors {
// Fatal error handling.
[[noreturn]] inline void fatalfWithCallStack(const char* messageFormat, ...)
{
va_list varArgs;
va_start(varArgs, messageFormat);
Platform::handleFatalError(messageFormat, true, varArgs);
}
[[noreturn]] inline void fatalf(const char* messageFormat, ...)
{
va_list varArgs;
va_start(varArgs, messageFormat);
Platform::handleFatalError(messageFormat, false, varArgs);
}
[[noreturn]] inline void fatal(const char* message) { fatalf("%s", message); }
[[noreturn]] inline void unimplemented(const char* context)
{
fatalf("%s is unimplemented", context);
}
}}
|