Skip to content
Snippets Groups Projects
Commit dc757fe9 authored by Georges Racinet's avatar Georges Racinet
Browse files

errors: ServiceError docstring had become outdated

We don't use functions meant for early return any more.
Some more precise exceptions can still be useful, if there is
possibility for catching them.
parent 61aef7a8
No related branches found
No related tags found
1 merge request!128Exception-style error returning
Pipeline #58681 passed with warnings
......@@ -15,10 +15,10 @@
class ServiceError(RuntimeError):
"""An exception class to complement setting of context.
In case when it is not practical for service methods to early return
using functions such as :func:`not_found`, this exception can be used
as marker that a problem was encountered *and handled by updating
gRPC context*.
In cases where a more precise exception than the bare `Exception()` raised
by `ServicerContext.abort()` is useful.
Caller is expected to set code and optionally details.
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment