V
Vlad
Please consider this code
public class MyClass{
public bool MyMethod1(){
return false;
}
public bool MyMethod2(){
int x=0,y=1/x;
return false;
}
}
If an exception occurs within MyMethod2 the stack trace is going to contain
the line numbers relative to the beginning of the file (in our case line 6).
Is there anyway to change that behavior and show the line numbers relative
to the method declaration (line 1)?
We use CodeDOM to generate the code on a fly and if any exception occurs
within each method it would be much more relevant to get the line numbers
relative to each method.
Thanks!
public class MyClass{
public bool MyMethod1(){
return false;
}
public bool MyMethod2(){
int x=0,y=1/x;
return false;
}
}
If an exception occurs within MyMethod2 the stack trace is going to contain
the line numbers relative to the beginning of the file (in our case line 6).
Is there anyway to change that behavior and show the line numbers relative
to the method declaration (line 1)?
We use CodeDOM to generate the code on a fly and if any exception occurs
within each method it would be much more relevant to get the line numbers
relative to each method.
Thanks!