Endjin.Assembly.ChangeDetection.Infrastructure.ExceptionHelper.WhenException C# (CSharp) Method

WhenException() public static method

Normally used in a finally block to execute code when an exception has occured.
public static WhenException ( System.Action executeWhenExceptionHasOccured ) : void
executeWhenExceptionHasOccured System.Action The method to execute when exception has occured.
return void
        public static void WhenException(Action executeWhenExceptionHasOccured)
        {
            // be robust and prevent masking the original error
            if (executeWhenExceptionHasOccured == null)
            {
                return;
            }

            if (InException)
            {
                executeWhenExceptionHasOccured();
            }
        }
    }