Login  Register

Antwort: Re: Various imageJ questions

Posted by Joachim Wesner on Feb 22, 2008; 2:53pm
URL: http://imagej.273.s1.nabble.com/Various-imageJ-questions-tp3697110p3697112.html

Hi again,

ImageJ Interest Group <[hidden email]> schrieb am 22.02.2008 14:59:37:

> Hi meastwood98,
>
> -If i was in the middle of a method(function) and i wanted to end the
> program immediately with a custom error message, how would i do this?
>
> You can try:
> javax.swing.JOptionPane.showMessageDialog(null,"Goodbye World!");
> System.exit(0);
>

I assume the original poster was more thinking along ending the *plugin*
from
somewhere deep in a method stack with a custom error message and returning
to ImageJ.
AFAIK this would require defining a user exception, "throwing" it when the
error occurs
and "catching" it at the upper plugin level, terminating the plugin
regularly.
Or is there already an IJ exception one can "throw" from a plugin without
terminating
IJ?

JW


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________