On Mon, 7 Nov 2022 05:55:18 GMT, Johannes Waigel <d...@openjdk.org> wrote:
> The `PCSCException` is thrown, but the error type is not visible due to the > "private-packe" access rule. > By changing the visibility it is possible to handle / access this exception > type explicitly in the catch. Exactly what wangweij says. Checking the instance is fundamental to find out the real cause. Especially because `PCSCException` is thrown not only on PCSC errors, but also on internal module errors. In this case also the error messages of `CardException` are not really helpful. (`CardException: list() failed`) The suggestion to extend the constructor sounds reasonable for me. ------------- PR: https://git.openjdk.org/jdk/pull/11012