mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
String: @re: catch “invalid group reference” exceptions. (Fixes second issue of GH-824.)
This commit is contained in:
parent
3cd9bb7896
commit
838c3e5a66
@ -28,6 +28,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
import re
|
||||
import sys
|
||||
import types
|
||||
import codecs
|
||||
@ -205,6 +206,8 @@ class String(callbacks.Plugin):
|
||||
irc.reply(v)
|
||||
except commands.ProcessTimeoutError as e:
|
||||
irc.error("ProcessTimeoutError: %s" % (e,))
|
||||
except re.error as e:
|
||||
irc.error(e.args[0])
|
||||
re = thread(wrap(re, [first('regexpMatcher', 'regexpReplacer'),
|
||||
'text']))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user