I want whenever an exception happens during execution of a function to automatically call a function before go to catch like a logger. typically something like this:
{
try
{
//some code
}
catch(Exception e)
{
//I want the below call to happen automatically instead of me writing it everytime
someFunction(e);
}
}