[kepler-dev] Abort/Retry/Error Stacktrace window

Christopher Brooks cxh at eecs.berkeley.edu
Fri Dec 16 10:19:28 PST 2005


Hi Kevin,
You wrote:

> Which brings me to something you probably know about.  Ptolemy likes
> to pop up a little "display stack trace" dialog.  The problem with
> this dialog is that after clicking on either buttons, the base
> window opens.  To a naieve user who is accostomed to random mishaps
> in windows, they might not be aware that the system is
> nonfunctional.  Is it possible to have some classes of exceptions
> (such as RuntimeException) which go past that dialog and force the
> application to abort?  Or better yet, presents a different dialog
> which then ends up aborting.

I'm always really nervous about forcing a quit on the application,
since we run the risk of losing user data etc.

I can see two ways to implement what you are proposing:

1) Modify ptolemy/util/MessageHandler.java so that it has
a errorAndExit() method that would do the right thing.
I'd prefer the message to be really clear that there is a problem 
and offer the user the option of not exiting.  However, it might
be worth just putting up the error and then the next click would 
call System.exit().

ptolemy/gui/GraphicalMessageHandler.java would need to be extended
to have the right buttons.

Be warned that I've run in to problems at start up where not all of
the configuration is functional and one want to put up an error
message but there is not enough configuration to really do this.

2) Create a TerminateJavaException (or something) that is meant to
terminate the Java process.  MessageHandler and
GraphicalMessageHandler would need to check for this exception, much
like how they check for CancelException.

It would seem that putting this work in the Ptolemy tree would the
natural location.  I believe Edward would have some input on the
design.

_Christopher








More information about the Kepler-dev mailing list