Skip to content
Snippets Groups Projects
Commit afdc3985 authored by Iustin Pop's avatar Iustin Pop
Browse files

Convert all backend function to exception


Instead of returning (False, msg) from rpc endpoints, we raise always
exceptions (the non-endpoint, internal functions can remain as is). This
means that the error paths are agnostic to how the failure is signalled
(i.e. by False, msg) and instead use only this method (exceptions) to
signal failures.

The patch also adds a log=False argument to _Fail so that trivial cases are not
logged (but usually it's a good idea to log all failures, for the record).

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 5a533f8a
Loading
Loading
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