error : throws java.lang.Exception but does not declare it.

Any idea?

I got message as following:

javadoc: warning - Method pipe.dialog.NodeDialog.updateWindow

documents that it throws java.lang.Exception,

but does not declare it.

This is the source code

/**

* Repaints this dialog after the modification.

*

* @exception Exception any exceptions

*/

public void updateWindow(){

p1.removeAll();

try{

populate();

setValues2Panel();

pack();

if(getHeight()>PHEIGHT)

setSize(new Dimension(getWidth(),PHEIGHT));

}catch(Exception e){

PipeUTIL.warn(this,"NewNodeDialog failed");

e.printStackTrace();}

}

[691 byte] By [qwang123] at [2007-9-27 0:02:13]
# 1

Javadoc is telling you that you have documented that the method is throwing an exception (@exception Exception any exceptions), but you have not declared any such exception being thrown in the method declaration....

The method declaration should read:

public void updateWindow()

throws Exception

if you want to document an Exception being thrown.. however, the method as defined does not likely throw any exception, since you surround the bulk of your code with try{} catch(Exception e) {}.

More likely, since the method is not set to throw any exceptions, you should just remove that @exception tag from the Javadoc.

jre95001 at 2007-7-4 14:40:27 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...