RosettaCodeData/Task/Exceptions/FutureBasic/exceptions-2.basic

16 lines
263 B
Plaintext

void local fn ThrowException
ExceptionRef e = fn ExceptionWithName( @"Oops!", @"Something went wrong", NULL )
try
throw e
end try
catch (e)
print fn ExceptionName( e ), fn ExceptionReason( e )
end catch
end fn
fn ThrowException
HandleEvents