From b495e602e58b606472730670750f2185c83b57f2 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 22 Nov 2022 16:30:06 +0100 Subject: [PATCH] More precise error message for malformed message --- .../pgpainless/decryption_verification/syntax_check/PDA.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/syntax_check/PDA.java b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/syntax_check/PDA.java index 07a5fdcb..adc5bb39 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/syntax_check/PDA.java +++ b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/syntax_check/PDA.java @@ -55,7 +55,7 @@ public class PDA { inputs.add(input); } catch (MalformedOpenPgpMessageException e) { MalformedOpenPgpMessageException wrapped = new MalformedOpenPgpMessageException( - "Malformed message: After reading stream " + Arrays.toString(inputs.toArray()) + + "Malformed message: After reading packet sequence " + Arrays.toString(inputs.toArray()) + ", token '" + input + "' is not allowed." + "\nNo transition from state '" + state + "' with stack " + Arrays.toString(stack.toArray()) + (stackSymbol != null ? "||'" + stackSymbol + "'." : "."), e);