try
{
// do something
}
catch(SomeException se)
{
throw se;
}
catch(SomeOtherException soe)
{
throw soe;
}
catch(Exception e)
{
throw e;
}
Useless try/catch block
Page 1 of 11 Replies - 2091 Views - Last Post: 29 June 2012 - 07:15 PM
#1
Useless try/catch block
Posted 28 May 2012 - 11:39 AM
Just came across this little gem today. Not necessarily a nightmare, but pretty bad nonetheless. It should be noted that it has gone through several revisions where the try/catch was used, but whoever left it like this was having a bad day.
Replies To: Useless try/catch block
#2
Re: Useless try/catch block
Posted 29 June 2012 - 07:15 PM
This one kind of depends on what is calling this code. Perhaps it was decided that your company wanted the calling object to handle the exception instead. Do you see this kind of action taken elsewhere? I would be wary about changing it before talking with your lead.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote






|