I am writing an error log procedure (for security reasons I cannot use log4net / elmah etc), and I wanted to know if it is possible to get the line number of the line where the error occured and / or the procedure name where the error occured?
I will be creating try catch finally statement blocks, so I am hoping to get the line number of the errorhandler (or the line that caused the error) and the related procedure name.
I am writing an error log procedure (for security reasons I cannot use log4net
Share
Catch (Exception e)
{
string errMessage = e.Message
string errTraceDetails = e.StackTrace
}
This should give you the details you need.