Comment 1 for bug 1261597

Revision history for this message
Michi Henning (michihenning) wrote :

run() is a oneway method internally. create_query() invokes run() on the server side asynchronously, to avoid blocking if run() is implemented synchronously. If run() throws, the client receives a finished() callback with the error indicator set (but no details about the exception).

We could add a set_exception(std::exception_ptr) method to Reply, so the scope can push an error. Calling this would implicitly send the finished message with the error flag back to the client.

I'm not sure whether we should try to move the error over the wire though. As far as I know, the SSS protocol doesn't allow errors to be returned from scopes as part of the results, so moving the exception over the wire would break location transparency.

But set_exception() could log the error, so it's possible to find out when things go wrong with a scope. Would that work for you?