Skip to content

Commit bd994f9

Browse files
committed
Clean up exception messages in PKCS7.parse()
1 parent cc88997 commit bd994f9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • base/src/main/java/org/mozilla/jss/netscape/security/pkcs

base/src/main/java/org/mozilla/jss/netscape/security/pkcs/PKCS7.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,11 @@ private void parse(DerInputStream derin) throws ParsingException {
176176
if (contentType.equals(ContentInfo.SIGNED_DATA_OID)) {
177177
parseSignedData(contentInfo.getContent());
178178
} else {
179-
throw new ParsingException("content type " + contentType +
180-
" not supported.");
179+
throw new ParsingException("Content type " + contentType + " not supported");
181180
}
182181
} catch (IOException e) {
183-
ParsingException pe =
184-
new ParsingException("IOException: " + e.getMessage());
182+
ParsingException pe = new ParsingException(
183+
"Unable to parse PKCS #7: " + e.getMessage(), e);
185184
pe.fillInStackTrace();
186185
throw pe;
187186
}

0 commit comments

Comments
 (0)