---
title: catch
framework: CKTool JS
role: symbol
role_heading: Instance Method
platforms: [cktool js 1.2.15+]
path: cktooljs/cancellablepromise/catch
---

# catch

Tells CancellablePromise what callback to call on failure of the inner promise.

## Declaration

```data
CancellablePromise catch(
	Function? onrejected
);
```

## Parameters

- `onrejected`: An optional function CancellablePromise calls when the inner promise rejects.

## Discussion

Discussion If you provide a function for the onrejected parameter, CancellablePromise calls that function if the promise fails.
