FUNCTION

block.run_must_fail

function run_must_fail(): failure

Build a test block from this test block builder, asserting that the building fails (i.e. throws an exception).

Typically used to test operation calls that must throw an exception.

Since

0.10.4


function run_must_fail(expected_message: text): failure

Build a test block from this test block builder, asserting that the building fails; i.e. throws an exception; with the given exception message.

Typically used to test operation calls that must throw an exception.

Parameters

  • expected_message — the expected substring of the error message

Since

0.11.0

© 2026 Chromia