Re: [capnproto] Error reporting with async/push interfaces?

2017-05-23 Thread 'Kenton Varda' via Cap'n Proto
Ah. Two things: 1) If the stream is dropped without done() ever having been called, you know at least that the data is incomplete. 2) Usually, I would recommend that the method you call to say "write data to this stream" should not return until all data is written. get @0 (filename :Text,

Re: [capnproto] Error reporting with async/push interfaces?

2017-05-23 Thread Ian Denhardt
I'm talking about reporting an error to the receiver of the data, not the caller of write(). E.g. I have a capnp interface for a remote filesystem, and I want to read data from a file. I pass the server a ByteStream to use to send me the data. How does the server report an error *to me*? Quoting

Re: [capnproto] Error reporting with async/push interfaces?

2017-05-23 Thread 'Kenton Varda' via Cap'n Proto
Hi Ian, I'm not sure I understand. write() can throw an exception. Does that not solve the problem? -Kenton On Mon, May 22, 2017 at 5:01 PM, Ian Denhardt wrote: > Are there established best practices for handling errors that occur with > async/push style interfaces, such as