Mercurial > pub > ImplabNet
diff Implab/Safe.cs @ 119:2573b562e328 v2
Promises rewritten, added improved version of AsyncQueue
author | cin |
---|---|
date | Sun, 11 Jan 2015 19:13:02 +0300 |
parents | daffa72a1cec |
children | 62d2f1e98c4e |
line wrap: on
line diff
--- a/Implab/Safe.cs Sun Dec 28 16:09:03 2014 +0300 +++ b/Implab/Safe.cs Sun Jan 11 19:13:02 2015 +0300 @@ -23,7 +23,7 @@ public static void ArgumentNotEmpty<T>(T[] param, string name) { if (param == null || param.Length == 0) - throw new ArgumentException("The array must be not emty"); + throw new ArgumentException("The array must be not emty", name); } public static void ArgumentNotNull(object param, string name) { @@ -61,7 +61,7 @@ public static IPromise InvokePromise(Action action) { ArgumentNotNull(action, "action"); - var p = new Promise<object>(); + var p = new Promise(); try { action(); p.Resolve();