turso_assert_unreachable!() { /* proc-macro */ }Expand description
Asserts that a code path is never reached. This is a hard assertion — it will terminate the program if the path is executed.
Maps to antithesis_sdk::assert_unreachable!.
§Behavior
- Without
antithesisfeature: calls [unreachable!] (panics with the message). - With
antithesisfeature: reports to Antithesis viaassert_unreachable!, prints the error, then callsexit(0).
§Parameters
"message"— human-readable description of why this path is unreachable (required).{ "key": value, ... }(optional) — structured details for Antithesis and the panic/exit message.
§Usage
ⓘ
turso_assert_unreachable!("message");
turso_assert_unreachable!("message", { "key": value });§When to use
Use for code paths that represent logic errors — places that should genuinely never
execute. For paths that are unexpected but not impossible (e.g., fallback branches
that indicate a likely bug but shouldn’t panic), prefer turso_soft_unreachable! instead.