FUNCTION::ASSERT(3stap) Logging Tapset FUNCTION::ASSERT(3stap)

# [NAME](#NAME)

function::assert - evaluate assertion

# [SYNOPSIS](#SYNOPSIS)

```
1) assert(expression:long)
```

```
2) assert(expression:long,msg:string)
```

# [ARGUMENTS](#ARGUMENTS)

*expression*

The expression to evaluate

*msg*

The formatted message string

# [DESCRIPTION](#DESCRIPTION)

1\) This function checks the expression and aborts the current running probe if expression evaluates to zero. Uses**error** and may be caught by try{} catch{}. A default message will be displayed.

2\) This function checks the expression and aborts the current running probe if expression evaluates to zero. Uses**error** and may be caught by try{} catch{}. The specified message will be displayed.

# [SEE ALSO0](#SEE_ALSO0)

[*tapset::logging*(3stap)](/man/enterprise-packages/systemtap/tapset::logging.3stap)

September 2026 SystemTap Tapset Reference Ver

---

Document: function::assert(3stap) from systemtap 5.6-r1 (Chainguard OS)
Source: https://sourceware.org/git/systemtap.git
