I know this is old but I recently discovered you can make individual stackframes from an Exceptions stacktrace object. Which means it handles the parsing for you.
VB Code:
  1. Try
  2.             Dim x As Integer = 1
  3.             Dim y As Integer = 0
  4.             Dim z As Integer = x / y
  5.         Catch ex As Exception
  6.             'create a stacktrace object from the except to parse it
  7.             Dim st As New StackTrace(ex, True)
  8.             'this just shows the first stackframe but there could be many
  9.             Dim sf As StackFrame = st.GetFrame(0)
  10.             MsgBox(String.Format("{0} {1} {2}", ex.Message, IO.Path.GetFileName(sf.GetFileName), sf.GetFileLineNumber), MsgBoxStyle.Critical)
  11.         End Try
I remembered this topic while answering another one.