AFAIK, the 'Procedure' property is available specifically for exceptions
that are of type SqlException, and it tells you the name of the SQL Server
stored procedure that threw an exception (perhaps other exception types have
a 'Procedure' as well - but not "otherwise uncategorized" exceptions).
Here is a snippet I have in my exception logging routine that writes out the
information. It tells me the name of the specific SQL Server stored
procedure that choked (this is the 'Procedure' you are asking about) and the
specific line number etc. very helpful to have this info:
if (exIncoming is SqlException) {
SqlException e = (SqlException) exIncoming;
//Exception Type
MyWriter.WriteElementString(@"ExceptionType", "SqlException");
// Exception Details
for (int i=0; i < e.Errors.Count; i++) {
MyWriter.WriteStartElement(@"ExceptionDetails");
MyWriter.WriteElementString(@"Message",
HttpUtility.HtmlEncode(e.Errors.Message));
MyWriter.WriteElementString(@"LineNumber",
HttpUtility.HtmlEncode(e.Errors.LineNumber.ToString()));
MyWriter.WriteElementString(@"Procedure",
HttpUtility.HtmlEncode(e.Errors.Procedure));
MyWriter.WriteElementString(@"SQLErrorNumber",
HttpUtility.HtmlEncode(e.Errors.Number.ToString()));
MyWriter.WriteElementString(@"SQLServerName",
HttpUtility.HtmlEncode(e.Errors.Server));
MyWriter.WriteElementString(@"Provider",
HttpUtility.HtmlEncode(e.Errors.Source));
MyWriter.WriteElementString(@"SQLStateValue",
HttpUtility.HtmlEncode(e.Errors.State.ToString()));
MyWriter.WriteEndElement(); // End Exception Details
}
}
HTH !