plugins execption problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

plugins execption problem

nicola76b@libero.it
Hi all,
I have a problem with manage exception in plugins.
e.g. code:
---------------
// Get line on image and alert if it is not a correct ROI.
try {
   _regionLine = (Line) imagePlus.getRoi();
} catch (NullPointerException npe) {
   System.err.println("Image does not contain a roi!!");
   IJ.error("Error", "Image does not contain a roi!!");
}
---------------
when I call plugin without drow row a correctly "java.lang.NullPointerException" is be diplay in imageJ exception windows, but my catch code is not be executed.
Can anybody help me??? Thanks a lot,

    Nicola