Beispiel #1
0
 private void ReportError(Race.ThrowingRunnable checkpoint, AtomicReference <Exception> error)
 {
     try
     {
         checkpoint.Run();
     }
     catch (Exception t)
     {
         error.compareAndSet(null, t);
     }
 }
Beispiel #2
0
 public static WorkerCommand <T, R> Command <T, R>(Race.ThrowingRunnable runnable)
 {
     return(StateConflict =>
     {
         try
         {
             runnable.Run();
             return null;
         }
         catch (Exception e)
         {
             throw e;
         }
         catch (Exception throwable)
         {
             throw new Exception(throwable);
         }
     });
 }