LEVIATHAN v962456e · 962456eee1

Standard Library

interface IFileException

The interface of every error that comes from working with files.

since 0.1.0-alpha.1linuxwindowswasm

bases
IException

Overview

Catch it to handle file errors without naming the concrete class. FileException is the class that implements it.

Examples

try {
    File f = File("/no/such/file.txt", std::read);
} catch (IFileException e) {
    console.writeln("file problem: ${e.message}");
}
file problem: cannot open: /no/such/file.txt

See also

  • FileException — The error thrown when a file operation fails.