Re: closing the Exception window
Posted by
Wayne Rasband on
May 13, 2008; 3:11pm
URL: http://imagej.273.s1.nabble.com/closing-the-Exception-window-tp3696237p3696238.html
> Hi everyone,
>
> I have a macro that uses a plug in that on occasion throws an
> Exception.
> It isn't a problem - but I am trying to build in handling for this.
> Right now I have this:
>
> if (isOpen("Exception")) {
> print("SLD: "+SLD+": "+SLDdir+SLDname+" threw an exception");
> selectWindow("Exception");
> close();
> }
>
> I get my Log window with my printed statement, but the close() fails by
> saying there is no window "Exception".
Use run("Close") instead of close(). The close() function only works
with image windows.
-wayne