public override void OnException(MethodArguments args, Exception e) { ++Exceptions; OnExceptionAction?.Invoke(args, e); InspectInstance?.Invoke(Instance); Assert.AreEqual(MethodName, args.MethodName, "OnException - MethodNames don't match"); }
public override OnExceptionAction OnAddException(Request request, Exception ex) { OnExceptionAction action = OnExceptionAction.Dismiss; if (RequestException != null) { RequestExceptionEventArgs args = new RequestExceptionEventArgs(request, ex, action); RequestException(this, args); action = args.OnExceptionAction; } return(action); }
public RequestExceptionEventArgs(Request request, Exception exception, OnExceptionAction exceptionAction) { this.request = request; this.exception = exception; this.exceptionAction = exceptionAction; }