diff Implab/ActionChainTaskBase.cs @ 196:40d7fed4a09e

fixed promise chaining behavior, the error handler doesn't handle result or cancellation handlers exceptions these exceptions are propagated to the next handlers.
author cin
date Mon, 29 Aug 2016 23:15:51 +0300
parents dd4a3590f9c6
children b305c678923a
line wrap: on
line diff
--- a/Implab/ActionChainTaskBase.cs	Fri Apr 22 13:13:08 2016 +0300
+++ b/Implab/ActionChainTaskBase.cs	Mon Aug 29 23:15:51 2016 +0300
@@ -36,10 +36,10 @@
                     // отдавать ли результат или подтвердить отмену (или вернуть ошибку).
                     CancellationRequested(p.Cancel);
                 } catch (Exception err) {
-                    HandleErrorInternal(err);
+                    SetErrorInternal(err);
                 }
             } else {
-                HandleErrorInternal(reason ?? new OperationCanceledException());
+                SetCancelledInternal(reason);
             }
         }