mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
21 lines
251 B
Plaintext
21 lines
251 B
Plaintext
faultdef BAD_STUFF, WORSE_STUFF, THE_WORST_STUFF;
|
|
fn int exitcode(fault )
|
|
{
|
|
switch
|
|
{
|
|
case THE_WORST_STUFF~!!:
|
|
default: return 70;
|
|
}
|
|
}
|
|
fn void? canFail()
|
|
{
|
|
}
|
|
fn int main()
|
|
{
|
|
if (catch err = canFail())
|
|
{
|
|
return exitcode(err);
|
|
}
|
|
return 0;
|
|
}
|