On 11/17/2022 10:27 PM, Xue-Lei Andrew Fan wrote:
On Thu, 17 Nov 2022 23:07:46 GMT, Johannes Waigel <d...@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


Reply via email to