You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by ga...@pseudocoder.co.uk on 2019/02/01 12:49:08 UTC

Questionable Exception Handling

org.apache.pdfbox.pdmodel.encryption.PublicKeySecurityHandler;


There are several instances where a Security Exception is caught and  
thrown as IOException.

Is there a particular reason for this?

I would have expected GeneralSecurityException as a throws value.

Kind Regards

Gavin


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Questionable Exception Handling

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 01.02.2019 um 13:49 schrieb gavinreid@pseudocoder.co.uk:
>
> org.apache.pdfbox.pdmodel.encryption.PublicKeySecurityHandler;
>
>
> There are several instances where a Security Exception is caught and 
> thrown as IOException.
>
> Is there a particular reason for this?
>
> I would have expected GeneralSecurityException as a throws value.


Probably historical. But we can't change it because this would be a 
breaking change. Even if we do, there is a "rule" that one shouldn't 
throw more than one checked exception.

Tilman


>
> Kind Regards
>
> Gavin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org