Mercurial > traipse_dev
diff orpg/tools/orpg_log.py @ 82:2fa8bd6785a5 ornery-dev
TerminalWriter's colors are nice, but if no debug console is open it causes the software to look for one until a recursion error is created. Crash reports are sent to the debug console and a pop-up tells the user one has happened. Fix to chat window from SnowDog.
author | sirebral |
---|---|
date | Thu, 27 Aug 2009 00:51:22 -0500 |
parents | 65c212e9a5b4 |
children | bdbeafcb2ef4 |
line wrap: on
line diff
--- a/orpg/tools/orpg_log.py Wed Aug 26 23:24:45 2009 -0500 +++ b/orpg/tools/orpg_log.py Thu Aug 27 00:51:22 2009 -0500 @@ -54,10 +54,7 @@ crash_report.close() logger.exception("Crash Report Created!!") logger.info("Printed out crash-report.txt in your System folder", True) - if sys.platform in ('win32', 'win64'): - logger.info("Press <enter> to continue!", True) - raw_input('') - #exit() + wx.MessageBox('Crash Report Created!', 'System Failure') class DebugConsole(wx.Frame): def __init__(self, parent): @@ -124,7 +121,8 @@ def log(self, msg, log_type, to_console=False): if self.log_to_console or to_console or log_type == ORPG_CRITICAL: - self._io.line(str(msg), **self._lvl_args[log_type]['colorizer']) + try: self._io.line(str(msg), **self._lvl_args[log_type]['colorizer']) + except: pass #Fails without the Debug Console try: component.get('debugger').AppendText(".. " + str(msg) +'\n') except: pass