RE: Why is the compiler flagging this variable as unassigned?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I didn't see this in any of the replies, but if you write the catch block
like this:

catch( exception ex)
{
throw;
}

you will rethrow the exception that you received with no changes. All
information will be retained. You will, however get a warning for not using
ex. This will allow you to place a break on the catch block for
troubleshooting purposes and view ex to see what is going on.

Chuck
.



Relevant Pages

  • Re: GCD(0,0)
    ... >>numbers of replies. ... >greatest common divisor of 0 and 0. ... You're justifying an exception to the name GCD by pointing out that 0 ...
    (sci.math)
  • Re: Xnews Scorefile help.
    ... exception. ... This is the very reason I flag googlegroup references, ... Because the upscored -5000 on references flags any replies to a GG post ... Killing all posts from Google Groups ...
    (news.software.readers)
  • Re: Returning Errors in COM+ using Autocomplete
    ... I dont understand the last sentecen, How can i rethrow and throw a new ... exception, could you show me some code? ... Alfredo Barrientos ... Prev by Date: ...
    (microsoft.public.dotnet.framework.component_services)
  • Re: Is ::lineDeallocateCall() Enough
    ... > Finally able to get the::CloseHandlecall to not throw an exception. ... Microsoft MVP for TAPI / Windows SDK ... * Please post all messages and replies to the newsgroup so all may ...
    (microsoft.public.win32.programmer.tapi)
  • P.Grid:Need custom error message - not "Property value is not vali
    ... Tried in the generic winfomrs NG - no replies. ... Thought I will try my luck in this NG... ... CanConvertFrom method and throw an exception from within that message. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)