class Fault
extends Instruction

Exceptions that disrupt the execution flow are called faults on Qworum. They are used in Qworum scripts.

Examples

Example 1

const fault = Fault.build('payment cancelled');
fault.type === 'payment cancelled'; // true

Static Methods

build(type)

Builder for Fault instructions. Suitable for service-specific faults only.

Properties

readonly
type

Methods

Serialises the object to string for informational purposes.

See

Usage

import { Fault } from ".";