RosettaCodeData/Task/Exceptions/M2000-Interpreter/exceptions.m2000
2023-07-01 13:44:08 -04:00

22 lines
540 B
Text

Module Errors {
Module Check {
Module Error1 {
A=1/0
}
Try ok {
Error1
}
' we get an Error, and Error$ print division by zero in module Error1
If Error or not ok then Print Error$
Error "New Error"
}
Try {
Check
}
Print Error=0 ' no Error return
Print Error$ ' but Error message isn't clear
' Error$ used one time, then cleared automatic
}
Errors
Print Error$=""