1

我希望在函数执行期间发生异常时自动调用函数,然后像记录器一样去捕获。通常是这样的:

{
    try
    {
        //some code
    }
    catch(Exception e)
    {
        //I want the below call to happen automatically instead of me writing it everytime
        someFunction(e);
    }
}
4

0 回答 0