Skip to content

Keyword: catch

Represents the safe block of code to execute after a try block fails. Used in chain with the try keyword.

glang
try {
    # ...
} safe error {
    bark("Some error occured: " + error);
}

catch takes an <indentifier> as the error output, where <indentifier> is a string type with the encountered error inside.

glang
try {
    1 / 0;
} catch division_error {
    bark(division_error); # output: division by 0
}

George Language is licensed under the GPL v3 openly. Help improve this site.