RosettaCodeData/Task/Exceptions/FutureBasic/exceptions-2.basic
2024-11-04 21:53:44 -08:00

15 lines
263 B
Text

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