Mercurial > pub > ImplabNet
comparison Implab/ActionTaskBase.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 |
comparison
equal
deleted
inserted
replaced
193:0d69c0d6de0d | 196:40d7fed4a09e |
---|---|
40 if (m_cancel != null) { | 40 if (m_cancel != null) { |
41 try { | 41 try { |
42 m_cancel(error); | 42 m_cancel(error); |
43 SetResult(); | 43 SetResult(); |
44 } catch(Exception err) { | 44 } catch(Exception err) { |
45 HandleErrorInternal(err); | 45 SetErrorInternal(err); |
46 } | 46 } |
47 } else { | 47 } else { |
48 HandleErrorInternal(error ?? new OperationCanceledException()); | 48 SetCancelledInternal(error); |
49 } | 49 } |
50 } | 50 } |
51 } | 51 } |
52 } | 52 } |
53 | 53 |