Skip to content
Snippets Groups Projects
Commit b90c48d6 authored by Adam Wardyński's avatar Adam Wardyński
Browse files

Add throwing destructor to RegexParseError

parent b78e6454
Branches
No related merge requests found
......@@ -8,13 +8,13 @@ RegexParseError::RegexParseError(
const UnicodeString& pattern,
const UErrorCode& status_code,
const UParseError& parse_error)
: status(u_errorName(status_code)),
: WcclError("Could not parse regular expression."),
status(u_errorName(status_code)),
pattern_line(parse_error.line),
offset(parse_error.offset),
pre_context(PwrNlp::to_utf8(UnicodeString(parse_error.preContext))),
error(PwrNlp::to_utf8(UnicodeString(parse_error.postContext))),
expression(pattern.toUTF8String(std::string())),
WcclError("Could not parse regular expression: " + status + ":" + error)
expression(PwrNlp::to_utf8(UnicodeString(pattern)))
{
}
......@@ -27,6 +27,10 @@ std::string RegexParseError::info() const
return ss.str();
}
RegexParseError::~RegexParseError() throw()
{
}
boost::shared_ptr<const RegexPattern> compile_regex(const UnicodeString &pat_str)
{
UParseError error;
......
......@@ -66,6 +66,8 @@ public:
const UErrorCode& status_code,
const UParseError& parse_error);
~RegexParseError() throw();
std::string info() const;
const std::string status;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment