Thread: c# exceptions
View Single Post
Old 10-12-2003, 03:46 PM   #1 (permalink)
npa
Code Monkey
 
Join Date: Jul 2003
Location: canada
Posts: 82
npa is on a distinguished road
c# exceptions

if, when using c# with asp.net, we have an exception that
we do not catch, i.e:

Code:
string s = null;
Response.Write(s.ToString());
we get the exact line numbers, etc, output when the
page displays the exception to us. we also get the
previous calls that have got us to this point (methods,
etc).

however, if we do something like:
Code:
// Page_Load(){
exceptionCheck();
// }

public void exceptionCheck(){
 try {
  throw new Exception("test");
 } catch(Exception e){
   Response.Write(e.ToString());
 }
}
we do not get the line-numbers from where this
method was called ... (exceptionCheck). why ? is it
just my setup ? i really need to have this ability
but i just can't figure it out .... i hope i am clear.
__________________
direct entry file specification.
npa is offline   Reply With Quote