It's possible that catch_() wasn't in the last release. I hardly remember anymore.
But catch_() is equivalent to calling then() with the first parameter being the identity function. then() accepts an optional second parameter which is the error handler -- maybe that's what you are looking for? -Kenton On Mar 22, 2017 1:07 AM, "Johannes Zeppenfeld" <[email protected]> wrote: > Hi Kenton, > > thanks for the recommendation! I completely agree that simply adding the > send promise to a task set is the most elegant way to go. However, what > about requests that need contextual information in order to properly handle > an error, e.g., to issue a retry? Is there any way to give the error > handler of the task set contextual information about the request that > failed? Using .eagerlyEvaluate(), such information can be included in the > error handling functor. > > The catch function also sounds promising, but I couldn't find any mention > of it in the code. Is this a brand new development? > > Thanks! > Johannes > > > On Tuesday, March 21, 2017 at 9:53:19 AM UTC+1, Johannes Zeppenfeld wrote: >> >> I have an RPC interface where most interface methods do not return a >> value, but perform some action on the server that may fail. >> >> If I just use `request.send();`, the call is made as intended, but any >> errors (i.e., exceptions) on the server side are silently ignored. >> >> Is using `request.send().ignoreResult().eagerlyEvaluate(errorHandler);` >> the intended method for detecting such errors from the client side? >> >> Is `kj::TaskSet` the appropriate container for storing such error >> handlers until they resolve? >> >> While each of those types is well documented on its own, I haven't found >> a lot of information on using the various types together. Is there a source >> of documentation I have missed? Especially regarding error handling? >> >> Thanks! >> Johannes >> > -- > You received this message because you are subscribed to the Google Groups > "Cap'n Proto" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at https://groups.google.com/group/capnproto. > -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/capnproto.
