Introspection / Error Handling

Hello all,

I use this code, as part of a total error handling/logging solution, to try to find and log the cause of errors.

Function Type(extends e as RuntimeException) As String
  Dim t as Introspection.TypeInfo
  t=Introspection.GetType(e).FullName
  
  if T <> nil then
    Dim Log As New clsLogging
    Log.LogFileAppend(T.FullName,3)
    return T.FullName
  else
    //this should never happen...
    return "Dunno!"
  end if
End Function

Is there a way, to extend this so I can be told what object was the offending object? For example what object may be Nil, and then set off this error handling?

Thanks,
Tim

Check out http://documentation.xojo.com/index.php/RuntimeException.Stack , with this you can find out the class and method. As far as I remember I have a Feedback request to get the line of the offending code.