Computer Science Canada

Exception handling in Turing?

Author:  wtd [ Fri Oct 29, 2004 8:10 pm ]
Post subject:  Exception handling in Turing?

So, one thing I haven't been able to figure out is whether or not Turing can deal with exceptions.

Author:  zylum [ Fri Oct 29, 2004 9:21 pm ]
Post subject: 

not really... the only thing it knows how to do is crash Rolling Eyes

Author:  Andy [ Sat Oct 30, 2004 9:47 am ]
Post subject: 

actually i think there is...

Error

Description This unit contains the predefined subprograms that deal with errors returned from other predefined subprograms.
All routines in the Error unit are exported qualified (and thus must be prefaced with "Error.").

The constants representing the possible errors returned by this module can be found in the ErrorNum module.


Last Returns the (integer) error code produced by the last call to a predefined subprogram.
LastMsg Returns the error string produced by the last call to a predefined subprogram.
LastStr Returns the string version of the error constant produced by the last call to a predefined subprogram.
Msg Returns the string that corresponds to a specified error code.
Str Returns the string version of the error constant that corresponds to a specified error code.
Trip This causes the specified error code to be set.
TripMsg This causes the specified error code and error message to be set.
Halt This causes execution to halt with the specified error message.


: