RE: exception handler
I would like to suggest something along the lines of a Basic I've been
using for a long time. It seems to work well.
on Error goto xxxxx (a labeled line)
then several items were available..
1. the line which caused the problem
2. the error code that occurred (i.e file not open. divide by zero, etc)
then you could decide what to do
abort the run or "resume xxxxx " a labeled line....
In euphoria it could be similar to the trace method
"with error" then onError("yourErrorRoutine")
onError("yourErrorRoutine") would set the routine to handle the error.
this could be reset in the program to different routines to handle the
exceptions as needed. Then after fixing the problem (if possible) there
needs to be a "resume" at the next statement. At least your program
could display a resonable explanation to the user, saves what it needs, etc.
I'm certainly not a systems guy, hope this makes some sense
george
|
Not Categorized, Please Help
|
|