Stacktrace with line numbers

  • Thread starter Thread starter Karsten Grombach
  • Start date Start date
K

Karsten Grombach

Hi,
I'm trying to implement a custom error page for testing purposes.
When an error occurs, I catch it in the global.asax and store it in a
session object, so that the custom error page can display it.
so far so good.
my problem is, that i would like to have a detailed error message like the
standard asp.net error message with line numbers etc. At the moment i'm just
getting the methods called...
This is the code I'm using:
sb.Append("<br>Stacktrace ")
sb.Append("<br>" + ex.StackTrace.Replace(System.Environment.NewLine,
"<br>"))
sb.Append("<br>")
sb.Append("<br>Error")
sb.Append("<br>" + ex.ToString().Replace(System.Environment.NewLine,
"<br>"))
sb.Append("<br>")

Any ideas??
Thanks and Regards
Karsten
 
Back
Top