1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-22 11:34:49 +02:00

More precise error message for malformed message

This commit is contained in:
Paul Schaub 2022-11-22 16:30:06 +01:00
parent 25190fc5df
commit b495e602e5

View file

@ -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);