Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] suppressing warnings

For cases when you really really do want an "empty" catch block the following works:

catch(ExceptionImGoingToSwallow ex) {
  ; // this catch block deliberately left empty
}

You could say the swallowed exception detection code isn't smart enough ;), but it doesn't complain at this implementation.


On 12/04/06, Ron Bodkin <rbodkin@xxxxxxxxxxxxxx> wrote:
There's also an Xlint warning option to turn this off globally: create or
edit an Xlint.properties file and add
swallowedExceptionInCatchBlock = ignore

With this warning, I'm actually struck by how often it is valid to swallow
exceptions: sometimes an exception is really expected logic and should be
ignored (or even NOT having an exception is the exception)...  Certainly in
error handling tests this happens a lot.

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Eric Bodden
Sent: Tuesday, April 11, 2006 10:55 PM
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] suppressing warnings

Hmmm, maybe by doing proper exception handling? ;-) The other possibility
should be @SuppressAjWarnings annotations. Did you try that?

Eric

--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada

________________________________

From: aspectj-users-bounces@xxxxxxxxxxx on behalf of Nguyen, Diane
Sent: Tue 11/04/2006 17:45
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] suppressing warnings



Hi,

I just upgraded to 1.5.1a, and now I get a bunch of
swallowedExceptionInCatchBlock warnings when I run iajc. Is there any
way to suppress these?

Thanks!
diane
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



--
-- Adrian
adrian.colyer@xxxxxxxxx

Back to the top