Hi all
I implemented a stacktrace analysis subroutine a while ago and for the most part, it works great... when I process an "unexpected error", I almost always generated something like this
however, sometimes my "line number" analysis returns this
Here's the code I am using to retrieve the line number
My guess as to the reason for the failure is that sometimes ":line" doesn't appear in this area... why would this be the case and how would you recommend I deal with this?
Many thanks!
-Justin
I implemented a stacktrace analysis subroutine a while ago and for the most part, it works great... when I process an "unexpected error", I almost always generated something like this
VB.NET:
5/13/2009 3:12:35 PM - UNEXPECTED ERROR - MS ACCESS DATABASE TABLE RETRIEVAL FAILED
Module : OleDbCommand
Procedure : GetMSAccess_DatabaseTable
In Line # 10
Exception Type : System.Data.OleDb.OleDbException
however, sometimes my "line number" analysis returns this
VB.NET:
In Line # System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at ADG.Class_Database.GetMSAccess_DatabaseTable(String strDatabaseTable)
Here's the code I am using to retrieve the line number
VB.NET:
Dim Line_Number As String = Exception_Type.StackTrace.ToString.Substring(InStr(Exception_Type.StackTrace.ToString, ":line ") + 5)
My guess as to the reason for the failure is that sometimes ":line" doesn't appear in this area... why would this be the case and how would you recommend I deal with this?
Many thanks!
-Justin