LEVIATHAN vd52e79c4 · d52e79c486

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

use io::console;

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

See also