-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pc_rpc.Server: Marshal exception on unencodable return value
This effectively just moves the pyon.encode() calls into the try/except block in _process_action(). This way, the client acutally gets an exception if the return value of a method call is not PYON-serializable instead of the connection just being dropped, and the exception being swallowed on the server side. This is very useful to debug things in practice, as 1) "… is not PYON-serializable" immediately points physicists who just use sipyco as a black box to what the error is, whereas a plain ConnectionResetError is rather inscrutable, and 2) the exception message includes a string representation of the intended return value, further making it clear what is going on.
- Loading branch information
1 parent
7eb7326
commit 1239b5d
Showing
2 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters