[Mono-list] "Empty catch" rule proposal for Gendarme?

Sebastien Pouliot sebastien.pouliot at gmail.com
Wed Mar 28 13:59:32 EDT 2007


On Wed, 2007-03-28 at 19:46 +0200, Matthijs ter Woord wrote:
> How about also checking for throw ex; ? as this will loose stack information.

Good one too, but it's already part of Gendarme ;-)

> 
> 
> Sebastien Pouliot wrote:
> > Hey,
> > 
> > It looks like a great candidate for a rule :-)
> > 
> > Sebastien
> > 
> > On Wed, 2007-03-28 at 18:47 +0200, "Andrés G. Aragoneses [ knocte ]"
> > wrote:
> >> Hello. I'm just a little upset of the many times I have to spend debug 
> >> sessions because of empty catch blocks (swallowing any exception that 
> >> the programmer never could imagine...). Then I was just wondering if it 
> >> was worth to create a rule for Gendarme that warned about it:
> >>
> >> catch
> >> {
> >> }
> >>
> >> OR:
> >>
> >> catch(Exception)
> >> {
> >> }
> >>
> >> OR:
> >>
> >> catch(Exception ex)
> >> {
> >> }
> >>
> >> Regards,
> >>
> >> 	Andrés	[ knocte ]
> >>
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list