Show an error message if something goes wrong with a quirk

This commit is contained in:
Kiooeht 2011-06-08 23:50:11 -07:00
parent 0f8b717547
commit 02126c3e23
2 changed files with 8 additions and 2 deletions

View file

@ -21,7 +21,6 @@ Bugs
* When using mood sort, scroll position jumps to last selected chum
* When left for a really long time, animations slow down pesterchum
* Openning userlist resets appearance of OP/voice for anyone that become OP/voice after you joined a memo
* No sign of error if regexp quirk is malformed (not enough captured groups, etc)
* Windows: Dragging a chum on top of another chum and releasing makes one disappear
Mac Bugs

View file

@ -658,7 +658,14 @@ class PesterConvo(QtGui.QFrame):
quirks = self.mainwindow.userprofile.quirks
lexmsg = lexMessage(text)
if type(lexmsg[0]) is not mecmd and self.applyquirks:
lexmsg = quirks.apply(lexmsg)
try:
lexmsg = quirks.apply(lexmsg)
except:
msgbox = QtGui.QMessageBox()
msgbox.setText("Whoa there! There seems to be a problem.")
msgbox.setInformativeText("A quirk seems to be having a problem. (Possibly you're trying to capture a non-existant group?)")
msgbox.exec_()
return
lexmsgs = splitMessage(lexmsg)
for lm in lexmsgs: