A
Andy Fish
Hi,
Whilst maintaining some old java code I have come across a pile of routines
that do this
public void someMethod() throws MyException {
try {
do some stuff...
} catch (MyException ex) {
throw ex;
}
}
I can't figure out what would make the programmer catch a specific exception
just to throw it again. Is there any legitimate functional or style reason
for the code to be like this or is it just a some legacy cruft?
Andy
Whilst maintaining some old java code I have come across a pile of routines
that do this
public void someMethod() throws MyException {
try {
do some stuff...
} catch (MyException ex) {
throw ex;
}
}
I can't figure out what would make the programmer catch a specific exception
just to throw it again. Is there any legitimate functional or style reason
for the code to be like this or is it just a some legacy cruft?
Andy