Re: Try/Catch
- Posted by jimcbrown (admin) Jan 13, 2015
- 5239 views
Spock said...
Because the internal routine responsible instead of calling FatalError (or whatever it is) would emit a console message and return a default value (in the case of a function).
Ok, this is reasonable. It wouldn't work 100% of the time (e.g. if the program is a console-based text editor and constantly refreshing the screen), but few things do.
Spock said...
As mentioned in an earlier post, a more sophisticated approach could be to also record the error in a log file to be sent to the developer, perhaps by way of a user-defined routine.
Not a bad idea. Perhaps we could even generate an ex.err (or cont.err) when this happens. The program keeps on running, but a record is made.