I've got a crash in the debugger with xmlDocument example

I got a XMLException… in the line: xml.LoadXml(xmlFile) using the example (read below):

[code]Dim xmlFile As FolderItem
xmlFile = GetOpenFolderItem("")

If xmlFile <> Nil Then
Dim xml As New XmlDocument

Catch e As XmlException
MsgBox("XML error: " + e.Message)
End Try
End If[/code]

After two or three essais, I checked the file in OSX QuickLook and it was looking as a genuine XML file until I loaded it with Apple’s TextEdit: it was not what I was thinking it was: it was a binary file with text here and there.

The main problem is… how Try Catch crashed at first ?

Exceptions always drop into the debugger if you have Project -> Break On Exceptions checked, regardless of whether the exception is actually handled. You can just click “Resume” to have your code continue through the exception handler.

OK: my “fault” (twice).

Thank you Paul for the information.

I was just curious (in this particuliar case, the exception allows me to find my approach was bad: the holds a XML document, but in a binary format.