On Tue, 11 Mar 2025 22:49:20 GMT, Damon Nguyen <[email protected]> wrote:
>> Added code to Iterates over all installed Look and Feel environments and
>> added related exception handling.
>>
>> Testing done.
>
> test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 131:
>
>> 129: UIManager.setLookAndFeel(laf.getClassName());
>> 130: } catch (ClassNotFoundException | InstantiationException |
>> 131: IllegalAccessException |
>> UnsupportedLookAndFeelException e) {
>
> This can just be set to `Exception e` rather than expanding it into separate
> exceptions.
This provides more targeted error messages and logging.
If you catch a broad Exception, you might inadvertently mask other unexpected
errors that should be investigated.
Separate exception handlers make it easier to identify the root cause of an
issue.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23964#discussion_r1991949772