failure
luau
local failure = require("@std/test/failure")WARNING
These APIs are still open to future evolution. In new major versions, they may change in backwards incompatible ways.
Summary
| Entry | Description |
|---|---|
| assertion | Returns a Failure describing an assertion failure at the call site, with msg as the failure message. |
| lifecycle | Returns a Failure describing an error that occurred in the hook lifecycle callback. |
| runtimeerror | Returns a Failure describing an unhandled runtime error, including a stack trace. |
Functions and Properties
failure.assertion
Returns a Failure describing an assertion failure at the call site, with msg as the failure message.
luau
(msg: string, depth: number?, negation: boolean?) -> Failurefailure.lifecycle
Returns a Failure describing an error that occurred in the hook lifecycle callback.
luau
(hook: types.Hook, err) -> Failurefailure.runtimeerror
Returns a Failure describing an unhandled runtime error, including a stack trace.
luau
(err) -> Failure