Re: suppress 'variable is declared but never used' for exception variables?

From: mikeb (mailbox.google_at_nospam.mailnull.com)
Date: 06/18/04


Date: Fri, 18 Jun 2004 08:50:50 -0700

Jon Skeet [C# MVP] wrote:
>
> While this will work, it would be better just to not declare WebExcp at
> all:
>
> catch (Exception)
> {
> ...
> }
>

Normally, yes. However, sometimes I have the exception variable there
so I can examine it when debugging.

-- 
mikeb


Relevant Pages

  • Re: Ridicilous!
    ... Jon Skeet [C# MVP] wrote: ... > what resources need to be loaded. ... > the performance hit later on if you get an exception for some other ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Ridicilous!
    ... Jon Skeet [C# MVP] wrote: ... > what resources need to be loaded. ... > the performance hit later on if you get an exception for some other ...
    (microsoft.public.dotnet.framework)
  • Re: Ridicilous!
    ... Jon Skeet [C# MVP] wrote: ... > what resources need to be loaded. ... > the performance hit later on if you get an exception for some other ...
    (microsoft.public.dotnet.general)
  • Re: Why finally?
    ... Jon Skeet [C# MVP] wrote: ... the exception is propagated without being caught ... More common is the try/finally form which doesn't have a catch block at all - this is usually actually hidden by a "using" statement ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: SBS 2003 BOSD (mrxdav.sys), Help Needed Please
    ... Cris Hanna [SBS - MVP] ... MVPs do not work for Microsoft ... Use!analyze -v to get detailed debugging information. ... exception record and context record. ...
    (microsoft.public.windows.server.sbs)