M
Mick Walker
How can I find the name of the current function being executed.
For example, lets say I have the following function
void Blah(int? y){
int z;
try {
z = y;
}
catch(Exception ex){
throw ex
}
}
Which will throw an exception if y is null(Nullable).
I am writing a class to log any exceptions to a SQL database, a column
indicating the name of the current function where the exception was
generated would be very handy.
So instead of throwing the exception, I would log it, and handle the
exception gracefully.
Not to sure if this can be done, on binaries not compiled without
debugging symbols. So does anyone care to enlighten me?
For example, lets say I have the following function
void Blah(int? y){
int z;
try {
z = y;
}
catch(Exception ex){
throw ex
}
}
Which will throw an exception if y is null(Nullable).
I am writing a class to log any exceptions to a SQL database, a column
indicating the name of the current function where the exception was
generated would be very handy.
So instead of throwing the exception, I would log it, and handle the
exception gracefully.
Not to sure if this can be done, on binaries not compiled without
debugging symbols. So does anyone care to enlighten me?