LEVIATHAN v962456e · 962456eee1

Standard Library

interface ICancelledException

The interface of the error that reports that a task was cancelled.

since 0.1.0-alpha.1linuxwindowswasm

bases
IException

Overview

Catch it to handle cancellation separately from other errors.

Examples

try {
    throw CancelledException("stopped");
} catch (ICancelledException e) {
    console.writeln(e.message);
}
stopped

See also