pattern = new Regex(translated, setFlags(flags));
}
//noinspection ConstantIfStatement
if (false) {
// to keep the compiler happy
throw new ArgumentException();
}
} catch (RegexSyntaxException e) {
throw new XPathException(e.getMessage());
} catch (ArgumentException e) {
throw new XPathException("Error in translated regular expression. Input regex = " +