summaryrefslogtreecommitdiff
path: root/include/modules/regex.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules/regex.h')
-rw-r--r--include/modules/regex.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/modules/regex.h b/include/modules/regex.h
index 875f942bc..e278df502 100644
--- a/include/modules/regex.h
+++ b/include/modules/regex.h
@@ -53,3 +53,13 @@ class RegexFactory : public DataProvider
virtual Regex* Create(const std::string& expr) = 0;
};
+
+class RegexException : public ModuleException
+{
+ public:
+ RegexException(const std::string& regex, const std::string& error)
+ : ModuleException("Error in regex '" + regex + "': " + error) { }
+
+ RegexException(const std::string& regex, const std::string& error, int offset)
+ : ModuleException("Error in regex '" + regex + "' at offset " + ConvToStr(offset) + ": " + error) { }
+};