> ## Documentation Index
> Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# core::assert

Panics if `cond` is false with the given `felt252` as error message.

## Signature

```rust theme={null}
pub fn assert(cond: bool, err_code: felt252)
```

## Examples

```rust theme={null}
assert(false, 'error message');
```
