RE: exception handler
- Posted by Robert Craig <rds at RapidEuphoria.com> Aug 26, 2004
- 403 views
For the global exception handler, I really don't want to support the resumption of the program from the point where the error occured. I have numerous optimizations in the Translator, and a couple in the interpreter, that would be ruined by this. It would mean the normal program control flow could be broken at any moment. The Translator could not make the very basic assumption that a statement will be executed after the preceding statement, without the possibility that all kinds of stuff will suddenly change due to an exception, e.g. global variable values. I can handle jumping into a crash routine, but not returning to the point of the exception and continuing. It would be too unreliable. Even with all optimizations turned off, I suspect the program would have difficulty in most cases trying to continue, e.g. if there was an uninitialized variable, a subscript out of bounds, etc. In most cases it doesn't seem likely that your handler would be able to come up with a good variable value that would let your program continue safely and productively. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com