class Try
extends Instruction

Try instructions are used for catching faults that may be raised when the browser's Qworum interpreter executes a Qworum script.

Examples

Example 1

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

Static Methods

build(
statement,
catchClauses
)

Builder function for Try instructions.

Methods

Serialises the object to string for informational purposes.

See

Usage

import { Try } from ".";