FIX [ISSUE #12446] macInstance 补充日志 (#12447)

This commit is contained in:
若念莫念 2024-08-01 14:59:07 +08:00 committed by GitHub
parent 3967c91d1a
commit 4e42fe6bad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -203,7 +203,9 @@ public final class NacosSignatureAlgorithm {
Mac instance = Mac.getInstance(jcaName); Mac instance = Mac.getInstance(jcaName);
instance.init(key); instance.init(key);
return instance; return instance;
} catch (NoSuchAlgorithmException | InvalidKeyException e) { } catch (NoSuchAlgorithmException e) {
throw new IllegalArgumentException("No Such Algorithm: " + jcaName);
} catch (InvalidKeyException e) {
throw new IllegalArgumentException("Invalid key: " + key); throw new IllegalArgumentException("Invalid key: " + key);
} }
} }