[Mono-list] "Empty catch" rule proposal for Gendarme?
Matthijs ter Woord
matthijsterwoord at gmail.com
Wed Mar 28 13:46:17 EDT 2007
How about also checking for throw ex; ? as this will loose stack information.
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 ]
>>
More information about the Mono-list
mailing list