From: Terrance S. <ts...@cs...> - 2004-05-06 21:33:50
|
All: I'm "pretty sure" the following changes will be transparent to people, but I figured I should notify everyone. I've made some changes to the system that include a backtrace list in the error ball thrown by throw. Here is how it works: If you call throw/1 directly, it throws the exact argument you give it. If you call any of the ISO throws, such as domain_error, instantiation_error, permission_error, etc., a term of the form error(Template,Message,Backtrace) is thrown. The system error handlers catch balls of the form error/2, error/3, '_$abort_ball'/1, and '_$abort_ball'/2. The default system error handler ignores the Backtrace argument in any of these balls, if present. Thus, for future flexibility, I think its best to use the prepackaged error routines (domain_error, instantiation_error, etc) rather than performing an explicit throw if you want the default system or user error handler to catch it. A couple of issues: 1) I think we should probably get rid of the abort_balls and treat them simply as miscellaneous error terms. 2) Right now I'm not printing out backtraces a la java. We should probably have an xsb_flag that makes the default handler print backtraces (default off). If I dont hear any comments in a couple of days, I'll go ahead and make the changes. Terry |