Mercurial > pub > ImplabNet
diff Implab/Promise.cs @ 99:8ddf1648eca4 v2
fixed TransientPromiseException handling
author | cin |
---|---|
date | Wed, 05 Nov 2014 02:31:35 +0300 |
parents | daffa72a1cec |
children | 279e226dffdd |
line wrap: on
line diff
--- a/Implab/Promise.cs Tue Nov 04 09:43:44 2014 +0300 +++ b/Implab/Promise.cs Wed Nov 05 02:31:35 2014 +0300 @@ -73,9 +73,9 @@ var res = errorHandler(err); if (medium != null) medium.Resolve(res); - } catch (TransientPromiseException err2) { + /*} catch (TransientPromiseException err2) { if (medium != null) - medium.Reject(err2.InnerException); + medium.Reject(err2.InnerException);*/ } catch (Exception err2) { if (medium != null) medium.Reject(err2); @@ -203,7 +203,7 @@ /// <exception cref="InvalidOperationException">Данное обещание уже выполнено</exception> public void Reject(Exception error) { if (BeginTransit()) { - m_error = error; + m_error = error is TransientPromiseException ? error.InnerException : error; CompleteTransit(REJECTED_STATE); OnStateChanged(); } else {