RFR: 8296408: Make the PCSCException public accessible

Michael StJohns mstjohns at comcast.net
Tue Nov 22 23:29:24 UTC 2022


On 11/17/2022 10:27 PM, Xue-Lei Andrew Fan wrote:
> On Thu, 17 Nov 2022 23:07:46 GMT, Johannes Waigel <duke at openjdk.org> wrote:
>
>> Checking the instance is fundamental to find out the real cause.
> Please don't do that in a serious application.  The exception stack is belong to implementation details, and may change any time.
>
> -------------
>
> PR: https://git.openjdk.org/jdk/pull/11012

Hi - Sorry - just getting back to the list after a few days away.

Given that this is a plugin provider for the PCSC access classes, and 
that CardException doesn't always pass through the details in a 
comprehensible way from the underlying cause, having access to 
PCSCException makes a lot of sense, and as far as I can tell is not a 
violation of the general plugin contract.

To make it even more useful, adding a "public long getErrorCode()" 
method to PCSCException would help with the cases where a code that 
isn't actually an  SCard* related code causing the PCSC exception.

But -

Wouldn't this also require a change to the module definition file?

Mike





More information about the security-dev mailing list