1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 19:03:16 +02:00

Add EvalErrorBuilder::panic()

An nicer alternative to printError + abort, or assert(false /* foo */)
This commit is contained in:
Robert Hensing 2024-07-11 11:35:58 +02:00
parent 13522229a9
commit 61577402ba
2 changed files with 14 additions and 0 deletions

View file

@ -112,6 +112,12 @@ public:
* Delete the `EvalErrorBuilder` and throw the underlying exception.
*/
[[gnu::noinline, gnu::noreturn]] void debugThrow();
/**
* A programming error or fatal condition occurred. Abort the process for core dump and debugging.
* This does not print a proper backtrace, because unwinding the stack is destructive.
*/
[[gnu::noinline, gnu::noreturn]] void panic();
};
}