diff Implab/Safe.cs @ 145:706fccb85524 v2

RC: cancellation support for promises + tests
author cin
date Sun, 08 Mar 2015 02:52:27 +0300
parents 6c49d02a9a05
children 2a8466f0cb8a
line wrap: on
line diff
--- a/Implab/Safe.cs	Fri Mar 06 15:45:26 2015 +0300
+++ b/Implab/Safe.cs	Sun Mar 08 02:52:27 2015 +0300
@@ -109,9 +109,9 @@
             ArgumentNotNull(action, "action");
 
             try {
-                return action() ?? Promise<T>.ExceptionToPromise(new Exception("The action returned null"));
+                return action() ?? Promise<T>.FromException(new Exception("The action returned null"));
             } catch (Exception err) {
-                return Promise<T>.ExceptionToPromise(err);
+                return Promise<T>.FromException(err);
             }
         }
     }