Is this a bug? Unhandled exception inside try catch ??

Tech-Archive recommends: Fix windows errors by optimizing your registry



When I run my Windows Forms application from VS using F5, execution stops inside a try-catch block, saying an unhandled(!) exception has occured. The exception is of type System.Xml.XmlException and the error message just says "System error".

The following is the code that causes the exception:

try
{
	xNode = xDoc.SelectSingleNode("descendant::job[@id='1']");
}
catch(Exception exc)
{
	//Code to log error
}


I've actually found the cause of the error (a pair of opening and closing tags in the xml file loaded into xDoc had mismatched casing), but why wasn't this exception caught by my try-catch block???


Is this a bug in Visual Studio (2003)?


Regards, Frode .



Relevant Pages

  • Re: Validating file names
    ... running Novel, from your G: running Linux file system, from your H: running ... I am not saying one does not exist! ... file file and handle any exceptions that were thrown. ... If an exception is thrown then the specified ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Coding Nothing in C#
    ... So you are saying that Null should work in this case? ... because of the null reference you are supplying by taking a peek at the ... Assuming that the exception is being thrown on the line that calls the ... Dim oDispatch As New Company.Queuing.CompanyDispatchQueue ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: GDI+ error with lots of PictureBoxes
    ... be no automated way of finding out which ones will fail" ... exception - same as automated way to find "bad" gifs. ... If it goes have more than one frame, then inside a try-catch block ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C++ Question: try-throw-catch
    ... but passing errors up the call chain isn't. ... it's a verbose way of saying, "I have no idea what to do, please crash ... it's a way of saying "it's not appropriate for me to decide what ... the function to handle the exception. ...
    (comp.games.development.programming.misc)
  • Re: Grammar question - is "hir" grammatically correct?
    ... plural and singular was deemed non-essential in that same time period. ... obviously, if it _does_ turn out to be a real exception, then the ... This is the origin of the saying, ... the English language where it's quite appropriate. ...
    (rec.arts.sf.written)