--- a/Beremiz.py Sun Mar 11 22:00:15 2012 +0100
+++ b/Beremiz.py Sun Mar 18 18:32:49 2012 +0100
@@ -318,28 +318,29 @@
self.LastRefreshTimer.start()
- for s, style in self.stack:
- if style is None : style=self.black_white
- if self.default_style != style:
- self.output.SetDefaultStyle(style)
- self.default_style = style
- self.output.AppendText(s)
- self.output.ScrollLines(s.count('\n')+1)
- self.output.ShowPosition(self.output.GetLastPosition())
- self.LastRefreshTime = gettime()
- self.RefreshLock.release()
- if newtime - self.rising_timer > 1:
- self.rising_timer = newtime
+ for s, style in self.stack: + if style is None : style=self.black_white + if self.default_style != style: + self.output.SetDefaultStyle(style) + self.default_style = style + self.output.AppendText(s) + self.output.ScrollLines(s.count('\n')+1) + self.output.ShowPosition(self.output.GetLastPosition()) + self.LastRefreshTime = gettime() + self.RefreshLock.release() + if newtime - self.rising_timer > 1: + self.rising_timer = newtime def write_warning(self, s):
self.write(s,self.red_white)
@@ -1743,11 +1744,6 @@
-def Display_Error_Dialog(e_value):
- message = wxMessageDialog(None, str(e_value), _("Error"), wxOK|wxICON_ERROR)
def get_last_traceback(tb):
@@ -1766,9 +1762,7 @@
traceback.print_exception(e_type, e_value, e_traceback) # this is very helpful when there's an exception in the rest of this func
last_tb = get_last_traceback(e_traceback)
ex = (last_tb.tb_frame.f_code.co_filename, last_tb.tb_frame.f_lineno)
- if str(e_value).startswith("!!!"):
- Display_Error_Dialog(e_value)
- elif ex not in ignored_exceptions:
+ if ex not in ignored_exceptions: bug_report_path = path+os.sep+"bug_report_"+date.replace(':','-').replace(' ','_')+".txt"
result = Display_Exception_Dialog(e_type,e_value,e_traceback,bug_report_path)