Log the exception when writing to file fails.
Set the default encoding from wxGetDefaultPyEncoding again. Recover from encoding errors when writing the memory file. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -716,7 +716,6 @@ Homepage: http://xrced.sourceforge.net\
|
||||
|
||||
# Simple emulation of python command line
|
||||
def OnDebugCMD(self, evt):
|
||||
import traceback
|
||||
while 1:
|
||||
try:
|
||||
exec raw_input('C:\> ')
|
||||
@@ -1033,6 +1032,8 @@ Homepage: http://xrced.sourceforge.net\
|
||||
self.modified = False
|
||||
panel.SetModified(False)
|
||||
except:
|
||||
inf = sys.exc_info()
|
||||
wxLogError(traceback.format_exception(inf[0], inf[1], None)[-1])
|
||||
wxLogError('Error writing file: %s' % path)
|
||||
raise
|
||||
|
||||
|
Reference in New Issue
Block a user