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

# [NAME](#NAME)

function::error - Send an error message

# [SYNOPSIS](#SYNOPSIS)

```


    error(msg:string)
```

# [ARGUMENTS](#ARGUMENTS)

*msg*

The formatted message string

# [DESCRIPTION](#DESCRIPTION)

An implicit end-of-line is added. staprun prepends the string “ERROR:”. Sending an error message aborts the currently running probe. Depending on the MAXERRORS parameter, it may trigger an **exit**.

# [SEE ALSO0](#SEE_ALSO0)

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

September 2026 SystemTap Tapset Reference Ver

---

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