# block.run_must_fail · Rell standard library · Chromia Docs (concept)

> function run_ must_ fail(): failure Build a test block from this test block builder, asserting that the building fails (i.e. throws
an exception). Typicall

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/rell.test/block/run_must_fail/

FUNCTION

# block.run\_must\_fail

```signature
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

---

```signature
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

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/rell.test/block/run_must_fail.html)Generated API reference, mirrored from the live docs
