title: Can't catch COMException (vb.net)
body: <p>I use the following code to access a VSS item:</p>
  
  <pre><code>Dim sItem As String = "$/MyVssProject/InexistentFile.txt"
  Dim oItem As SourceSafeTypeLib.VSSItem = Nothing
  Try
    oItem = m_oSourceSafe.VSSItem(sItem)
  Catch ex As Runtime.InteropServices.COMException
    MsgBox(ex.Message, MsgBoxStyle.Exclamation)
  Catch ex As Exception
    MsgBox(ex.Message, MsgBoxStyle.Exclamation)
  End Try
  </code></pre>
  
  <p>The problem I face is when I try to get an instance to a file that doesn't exist in the VSSDB, thus leading to a COMException, which basically wouldn't be of a problem (I would expect).
  In fact the exception occurs, but instead of proceeding with the catch code, the debug cursor stays on the line "oItem = m_oSourceSafe.VSSItem(sItem)", showing a dialog with title "COMException crossed a native/managed boundary.</p>
  
  <p>From here the execution doesn't proceed, until I change the content of sItem to an existing file.</p>
  
  <p>Why does the exception not get caught, and how can I achieve it?</p>
  
  <p>Environment: VS2010 with .Net 2.0 on WinXP SP3 x86</p>
  
  <p>Thanks mates!</p>