From fd2f6523ecb8caea3f830fbb63384e11e79808f8 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Wed, 16 Nov 2022 17:36:51 +0100 Subject: [PATCH] More specific exception message for when nesting depth is exceeded --- .../org/pgpainless/decryption_verification/MessageMetadata.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/MessageMetadata.java b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/MessageMetadata.java index 1bf22b47..3af2a4d3 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/MessageMetadata.java +++ b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/MessageMetadata.java @@ -399,7 +399,7 @@ public class MessageMetadata { public Layer(int depth) { this.depth = depth; if (depth > MAX_LAYER_DEPTH) { - throw new MalformedOpenPgpMessageException("Maximum nesting depth exceeded."); + throw new MalformedOpenPgpMessageException("Maximum packet nesting depth (" + MAX_LAYER_DEPTH + ") exceeded."); } }