Optionalmessage: stringThe Exception's message.
Optionaloptions: ExceptionOptionsAn Exception.
Actual Type: Method
Note: Stripped to generate better documentation.
Creates a TypeException. An exception thrown for unexpected types.
Optionalmessage: stringThe TypeException's message.
Optionaloptions: ExceptionOptionsOptions to construct the TypeException. Only
contains cause which specifies the cause of the TypeException.
Actual Type: Method
Note: Stripped to generate better documentation.
Creates an AggregateException. Thrown to aggregate multiple exceptions as one. E.g. when all of the FuturesAPI.any() Future reject.
A List containing the collection of exceptions to aggregate.
Optionalmessage: stringThe AggregateException's message.
Optionaloptions: ExceptionOptionsOptions to construct the AggregateException. Only
contains cause which specifies the cause of the
AggregateException.
const { exceptions, containers } = createFutureMachine(futureDatabase);
const error1 = exceptions.createException('First failure');
const error2 = exceptions.createException('Second failure');
const errorList = containers.list.create(error1, error2);
const exception: AggregateException = exceptions.createAggregateException(
errorList,
'Multiple operations failed'
);
Actual Type: Method
Note: Stripped to generate better documentation.
Creates a SerializableException. An exception thrown when a value cannot be serialized. E.g. when a Method throws a non-Serializable type.
Optionalmessage: stringThe SerializableException's message.
Optionaloptions: ExceptionOptionsOptions to construct the SerializableException.
Only contains cause which specifies the cause of the
SerializableException.
The API for Exceptions.
The Serializable equivalent of a vanilla JavaScript
Error.