diff --git a/src/com/silverwrist/venice/htmlcheck/filters/EmoticonTagHandler.java b/src/com/silverwrist/venice/htmlcheck/filters/EmoticonTagHandler.java
index 633edbb..cf419be 100644
--- a/src/com/silverwrist/venice/htmlcheck/filters/EmoticonTagHandler.java
+++ b/src/com/silverwrist/venice/htmlcheck/filters/EmoticonTagHandler.java
@@ -91,7 +91,18 @@ public class EmoticonTagHandler implements Rewriter
public MarkupData rewrite(String data, RewriterServices svc)
{
logger.debug("EmoticonTagHandler looking at: " + data);
- RE r = new RE("ei:\\s*(\\w+)(?:\\s*/)?\\s*");
+ RE r = null;
+ try
+ { // compile regular expression
+ r = new RE("ei:\\s*(\\w+)(?:\\s*/)?\\s*");
+
+ } // end try
+ catch (RESyntaxException e)
+ { // something wicked this way comes
+ logger.fatal("WTF?!?!?!?",e);
+
+ } // end catch
+
if (!(r.match(data)))
return null;
String icon_name = r.getParen(1);
diff --git a/src/com/silverwrist/venice/ui/config/EmoticonManager.java b/src/com/silverwrist/venice/ui/config/EmoticonManager.java
index 9a830ee..dd3b14a 100644
--- a/src/com/silverwrist/venice/ui/config/EmoticonManager.java
+++ b/src/com/silverwrist/venice/ui/config/EmoticonManager.java
@@ -149,7 +149,18 @@ public class EmoticonManager
public String rewriteText(RequestOutput out, String txt)
{
- RE r = new RE("");
+ RE r = null;
+ try
+ { // create the regexp
+ r = new RE("");
+
+ } // end try
+ catch (RESyntaxException e)
+ { // something wicked this way comes
+ logger.fatal("WTF?!?!?!?",e);
+
+ } // end catch
+
if (!(r.match(txt)))
{ // null it out
logger.debug("EmoticonManager.rewriteText matched nothing at all");