29 Apr
2013
29 Apr
'13
6:11 a.m.
Le 28/04/13 23:28, Rob Stewart a écrit :
On Apr 28, 2013, at 2:17 PM, "Pierre T."
wrote: On 04/28/2013 07:30 PM, Vicente J. Botet Escriba wrote:
Yes this is quite similar if we had exceptions and we had a try/catch block
f0().then(f1).then(f2).then(f3).visit_error(error_visitor);
try { f3(f2(f1(f0()))); } catch(...) { error_visitor(); } When the chain gets long, try blocks make increasing sense. Agreed.
It would be great if we could have the equivalent for try { h(f(), g()); } catch(...) { error_visitor(); }
when_all(f(), g()).then(h).visit_error(error_visitor); "if_all" seems better than "when_all".
+1. Vicente