---
name: "function::error"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::error"
---

# function::error(3stap)

Send an error message

## NAME

function::error - Send an error message

## SYNOPSIS

```
    error(msg:string)
```

## ARGUMENTS

*msg*

The formatted message string

## 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

[*tapset::logging*(3stap)](/tapset::logging/3stap.md)
