aboutsummaryrefslogtreecommitdiff
path: root/src/Probe.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Probe.java')
-rw-r--r--src/Probe.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Probe.java b/src/Probe.java
index 56085fe..c3f05c2 100644
--- a/src/Probe.java
+++ b/src/Probe.java
@@ -7,6 +7,8 @@
* (c) CENA
*
* Changelog:
+ * 1.2.13
+ * - adds support for RESyntaxException
* 1.2.12
* - .ping is back
* 1.2.9
@@ -145,9 +147,19 @@ public class Probe implements IvyApplicationListener, IvyMessageListener, IvyBin
private Ivy bus;
private boolean timestamp,quiet,debug,exitOnDie=false;
- private static RE directMsgRE = new RE("^\\.direct ([^ ]*) ([0-9]+) (.*)");
- private static RE timeCountRE = new RE("^\\.time (\\d+) (.*)");
+ private static RE directMsgRE, timeCountRE;
+
+ static {
+ try {
+ directMsgRE = new RE("^\\.direct ([^ ]*) ([0-9]+) (.*)");
+ timeCountRE = new RE("^\\.time (\\d+) (.*)");
+ } catch ( RESyntaxException res ) {
+ res.printStackTrace();
+ System.out.println("Regular Expression bug in Ivy source code ... bailing out");
+ System.exit(0);
+ }
+ }
public Probe(BufferedReader in, boolean timestamp,boolean quiet,boolean debug) {
this.in=in;
this.timestamp=timestamp;