Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

/development/compiler/tests/fixtures/source_corpus/valid/fallible-catch.nct

fallible-catch.nct

// Valid source-corpus fixture.
use std/io.print

func main(): i32! {
    run() catch error {
        print("failed") catch print_error {
            return 1
        }

        return 1
    }

    return 0
}

func run(): void! {
    print("Hello")?
    return
}