Ejemplo n.º 1
0
 /// <summary>
 /// Catch runs right when the exception happens (on the same thread)
 /// Chain will be cancelled
 /// </summary>
 public ITask Catch(Action <Exception> handler)
 {
     Guard.ArgumentNotNull(handler, "handler");
     faultHandler += e => { handler(e); return(false); };
     DependsOn?.Catch(handler);
     return(this);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Catch runs right when the exception happens (on the same threaD)
 /// Return true if you want the task to completely successfully
 /// </summary>
 public ITask Catch(Func <Exception, bool> handler)
 {
     Guard.ArgumentNotNull(handler, "handler");
     faultHandler += handler;
     DependsOn?.Catch(handler);
     return(this);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Catch runs right when the exception happens (on the same threaD)
 /// Return true if you want the task to completely successfully
 /// </summary>
 public ITask Catch(Func <Exception, bool> handler)
 {
     Guard.ArgumentNotNull(handler, "handler");
     CatchInternal(handler);
     DependsOn?.Catch(handler);
     return(this);
 }