method Try.build
Try.build(
statement,
catchClauses,
)

Builder function for Try instructions.

Examples

Example 1

const try1 = Try.build( Call.build('@', 'checkout/'), [ {catch: ['the cart is empty'], do: Json({})} ] );

Parameters

statement

A statement (instruction or data value) or a non-empty array of statements.

catchClauses

One catch clause or an array of catch clauses.

Return Type

Throws

Error

See

Usage

import { Try } from ".";