Can I detect at runtime inside method Helper() that the program execution is the result of a thrown exception?
Note, my goal is to avoid extending method Helper() to take an exception object as a input pararmeter.
public void MyFunc1()
{
try
{
// some code here that eventaully throws an exception
}
catch( Exception ex )
{
Helper();
}
}
public void MyFunc2()
{
Helper();
}
private void Helper()
{
// how can I check if program execution is the
// result of a thrown exception here.
}