Pylons / pyramid_rpc

RPC plugins for pyramid. XML-RPC, JSON-RPC, etc.
https://docs.pylonsproject.org/projects/pyramid-rpc/en/latest/
Other
27 stars 20 forks source link

Allow us to disable exception views #29

Closed inklesspen closed 9 years ago

inklesspen commented 9 years ago

We use pyramid_rpc at my company and we have some unique exception handling requirements (basically to help us match up exceptions on the client and server side). I wanted to register an exception view for Exception, but I couldn't because add_jsonrpc_endpoint already does that.

(I worked around the issue by registering an exception view for StandardError, which is a superclass of nearly all Python--provided exceptions (and we already have a base class for our service's exceptions), but it would be nice to be able to tell add_jsonrpc_endpoint to skip the exception view.)

mmerickel commented 9 years ago

You can override the exception view if you commit the configurator first. And of course you can register exception views for more specific exceptions as you wish without any commit.

inklesspen commented 9 years ago

Oh, cool. Yep, that works swimmingly, thanks!