1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-22 19:08:00 +01: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); inputs.add(input);
} catch (MalformedOpenPgpMessageException e) { } catch (MalformedOpenPgpMessageException e) {
MalformedOpenPgpMessageException wrapped = new MalformedOpenPgpMessageException( 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." + ", token '" + input + "' is not allowed." +
"\nNo transition from state '" + state + "' with stack " + Arrays.toString(stack.toArray()) + "\nNo transition from state '" + state + "' with stack " + Arrays.toString(stack.toArray()) +
(stackSymbol != null ? "||'" + stackSymbol + "'." : "."), e); (stackSymbol != null ? "||'" + stackSymbol + "'." : "."), e);