The point is that it shouldn't do anything at all unless there is an error.
You effectively have:
| public void doSomething(X parameter)
| {
| check(parameter);
| doIt(parameter);
| }
|
| private void doIt(parameter)
| {
| check(parameter);
| ...
| }
|
The correct code - since we don't implement doIt() and it gives bad error messages
should be:
| public void doSomething(X parameter)
| {
| try
| {
| doIt(parameter);
| }
| catch (Exception e)
| {
| throw fixErrorMessage(e);
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157717#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...