Skip to content

Commit 75ed27a

Browse files
judy2khzalaz
authored andcommitted
Pass caught Exception directly to RuntimeException (auth0#83)
The Exception that has been caught should be wrapped by RuntimeException. By calling 'getCause', you're looking further up the chain for a cause, and the resulting value could be `null`.
1 parent b6dccdf commit 75ed27a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/auth0/jwt/JWTSigner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public String sign(final Map<String, Object> claims, final Options options) {
7777
segments.add(encodedSignature(join(segments, "."), algorithm));
7878
return join(segments, ".");
7979
} catch (Exception e) {
80-
throw new RuntimeException(e.getCause());
80+
throw new RuntimeException(e);
8181
}
8282
}
8383

0 commit comments

Comments
 (0)