[ltk-user] Greatly improved error/condition handling
Thomas F. Burdick
tburdick at gmail.com
Sun Feb 21 17:33:57 UTC 2010
I'm happy to announce that I (finally!) merged a new, greatly improved
graphical condition handler into the repl branch.
To take advantage of it, you don't need to do anything. By default,
you'll get an error handler designed to be used by developers. If an
error is signaled, you'll get a modal dialogue with the error message,
plus a few buttons:
* Dismiss will abort handling the Ltk event and go back to the main loop
* Show Details will show you the stack trace. Not all lisps will
actually get a stack trace here (SBCL and Allegro are privileged as
usual), but patches are welcome :-)
* Debugger will drop you into your system's debugger. If you're
running Slime, this will be Slime's. Otherwise, you should probably
look for a terminal.
* Report Bug is a cool feature (if I say so myself). It pops up a bug
reporter, which will save all the error information, including Ltk and
CL version information, to a bug report file.
For deployment to end users, you will probably want to to specify
:DEBUG 1 to WITH-LTK (the default is 2). With this setting, you will
simply see "An internal error has occured" and there will be no
"Debugger" button. The bug report file should contain all the details
you want from a bug report, though.
:DEBUG 0 will do no condition handling, and leave everything to your
:DEBUG 1 will use the PRODUCTION-CONDITION-HANDLER class
:DEBUG 2 will use the GRAPHICAL-CONDITION-HANDLER class
:DEBUG 3 will use the PARANOID-CONDITION-HANDLER class (it pops up a
modal dialogue for /every/ condition signaled)
Even better, the new graphical condition handling system is
object-oriented and extensible. For example, you probably may want the
bug reporter to send you an email. This is easy enough to add by
subclassing PRODUCTION-CONDITION-HANDLER and writing a new REPORT-BUG
method. The existing condition handler classes should be helpful as
To use your new condition handler, simply pass :DEBUGGER-CLASS
MY-DEBUGGER-CLASS to WITH-LTK.
Any feedback is welcome, and if you have bugs or questions, please ask
More information about the ltk-user