471,082 Members | 706 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,082 software developers and data experts.

Displaying last command executed?

JP
Is there a wayin C#:

If a program errors and gets directed to the global asax file. I know you
can display the stack traces, line#s , methods, ect. Is there a way in code
to display the ACTUAL line of text that caused the error?

So I would actually see for example:
"Response.Write(Request["Message"].ToString());"

if that was the line that caused the error
--
JP
..NET Software Developer
Oct 11 '06 #1
1 972
In article <EC**********************************@microsoft.co m>,
JP@discussions.microsoft.com says...
Is there a wayin C#:

If a program errors and gets directed to the global asax file. I know you
can display the stack traces, line#s , methods, ect. Is there a way in code
to display the ACTUAL line of text that caused the error?

So I would actually see for example:
"Response.Write(Request["Message"].ToString());"

if that was the line that caused the error
Possibly, but only if the app is compiled in debug mode. When you
compile in release mode, optimizations may happen that prevent a 1:1
mapping between an IL instruction that caused an exception and a
particular line in your source code.

--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Perochon Sebastien | last post: by
15 posts views Thread by Jameson | last post: by
7 posts views Thread by mosipenko | last post: by
reply views Thread by Michael | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.