Skip to content

Commit 8f0cd00

Browse files
committed
fixed so it will display exception message on invalid regex
1 parent bb9b51e commit 8f0cd00

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

www/test.jsp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
pw.print(StringEscapeUtils.escapeHtml4(e.getMessage()));
106106
pw.println("</td>");
107107
pw.println("\t\t</tr>");
108+
retVal.put("message", e.getMessage());
108109
}
109110
int groupCount = 0;
110111
@@ -122,7 +123,11 @@
122123
pw.println("</table>");
123124
124125
125-
if (p != null)
126+
if (p == null)
127+
{
128+
retVal.put("success", Boolean.FALSE);
129+
}
130+
else
126131
{
127132
pw.println("<table class=\"table table-bordered table-striped bordered-table zebra-striped\">");
128133
pw.println("\t<thead>");
@@ -257,11 +262,10 @@
257262
pw.println("\t</tbody>");
258263
pw.println("</table>");
259264
260-
pw.close();
261-
262265
retVal.put("success", Boolean.TRUE);
263-
retVal.put("html", sw.toString());
264266
}
267+
pw.close();
268+
retVal.put("html", sw.toString());
265269
}
266270
267271
String json = retVal.toString();

0 commit comments

Comments
 (0)