From 5ca878f334f9adeaad83cafc0cf8ddf7b1aeec21 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 6 Feb 2023 15:33:19 -0600 Subject: [PATCH] Report bad format string on error Signed-off-by: Joakim Erdfelt --- .../main/java/org/eclipse/jetty/server/CustomRequestLog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java b/jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java index 4eb998d3370..6a6ad0d0df7 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java @@ -571,14 +571,14 @@ public class CustomRequestLog extends ContainerLifeCycle implements RequestLog } else { - throw new IllegalStateException("formatString parsing error"); + throw new IllegalStateException("formatString parsing error: " + formatString); } remaining = m.group("REMAINING"); } else { - throw new IllegalArgumentException("Invalid format string"); + throw new IllegalArgumentException("Invalid format string: " + formatString); } }