aboutsummaryrefslogtreecommitdiffstats
path: root/src/ruleparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ruleparser.cpp')
-rw-r--r--src/ruleparser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index 5927c5a..1744969 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -193,6 +193,10 @@ void Rules::load()
state = ReadingMatch;
match = Match();
match.rx = QRegExp(matchLine.cap(1), Qt::CaseSensitive, QRegExp::RegExp2);
+ if( !match.rx.isValid() )
+ qFatal("Malformed regular expression '%s' in file:'%s':%d, Error: %s",
+ qPrintable(matchLine.cap(1)), qPrintable(filename), lineNumber,
+ qPrintable(match.rx.errorString()));
match.lineNumber = lineNumber;
match.filename = filename;
} else if (isVariableRule) {