---
url: /process-functions/script-abort.md
description: >-
  This function is used to cancel the execution of a process when an un-handled
  error has occurred.
---

# script.abort

This function is used to cancel the execution of a process when an un-handled error has occurred.

```js
script.abort(reasonText) 
```

#### Parameters

* `reasonText` - the line of text to output which explains why the process is aborting.

#### Example

```js
script.abort('Something was not as expected.');
```
