jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1412122 - /jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java
Date Wed, 21 Nov 2012 14:24:36 GMT
Author: sebb
Date: Wed Nov 21 14:24:36 2012
New Revision: 1412122

URL: http://svn.apache.org/viewvc?rev=1412122&view=rev
Log:
Report regex syntax errors direct to the user (not particularly useful to log them).

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java?rev=1412122&r1=1412121&r2=1412122&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java Wed
Nov 21 14:24:36 2012
@@ -26,6 +26,7 @@ import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
 
 import javax.swing.AbstractAction;
 import javax.swing.ActionMap;
@@ -150,6 +151,11 @@ public class SearchTextExtension impleme
                             .getResString("search_text_button_find"));// $NON-NLS-1$
                     results.setCaretPosition(0);
                 }
+            } catch (PatternSyntaxException pse) {
+                JOptionPane.showMessageDialog(null, 
+                        pse.toString(),// $NON-NLS-1$
+                        JMeterUtils.getResString("error_title"), // $NON-NLS-1$
+                        JOptionPane.WARNING_MESSAGE);
             } catch (BadLocationException ble) {
                 log.error("Location exception in text find", ble);// $NON-NLS-1$
             }



Mime
View raw message