protected bool OnFailed(CommandExecutorContext context, Exception ex) { var args = new CommandExecutorFailureEventArgs(context, ex); //激发“Failed”事件 this.OnFailed(args); //输出异常信息 if (!args.ExceptionHandled && args.Exception != null) { this.Error.WriteLine(args.Exception); } return(args.ExceptionHandled); }
protected virtual void OnFailed(CommandExecutorFailureEventArgs args) { this.Failed?.Invoke(this, args); }