1757
1763
def re_compile_checked(re_string, flags=0, where=""):
1758
1764
"""Return a compiled re, or raise a sensible error.
1760
1766
This should only be used when compiling user-supplied REs.
1762
1768
:param re_string: Text form of regular expression.
1763
1769
:param flags: eg re.IGNORECASE
1765
1771
it occurred, eg 'log search filter'.
1767
1773
# from https://bugs.launchpad.net/bzr/+bug/251352