[Pki-devel] [PATCH] 196 - Add decorator to handle exceptions

Ade Lee alee at redhat.com
Wed Feb 19 18:25:04 UTC 2014


Pushed to master. 

Will address comment 1 in separate patch.
Comment 2 deferred to later discussion.

On Tue, 2014-02-18 at 13:55 -0600, Endi Sukma Dewata wrote:
> On 2/17/2014 11:38 AM, Ade Lee wrote:
> >      Added decorator to handle exceptions
> >
> >      Decorator catches HttpErrorExceptions from Requests
> >      and extracts the relevant PKIException object, and rethrows
> >      it.
> 
> ACK. Just some comments:
> 
> 1. In EXCEPTION_MAPPINGS is it possible to map to the exception class 
> directly? For example:
> 
>      EXCEPTION_MAPPINGS = {
>          "com.netscape.certsrv.base.BadRequestException":
>              pki.BadRequestException,
>          ...
>      }
> 
> This way it's not necessary to interpret the string class name.
> 
> 2. I'm thinking we may not need the individual 
> <Resource>NotFoundException for Cert, Group, Profile, and User. So far I 
> don't see a lot of benefit in the Java version. We might be able to just 
> use the base ResourceNotFoundException.
> 





More information about the Pki-devel mailing list