Permalink
Browse files

Be verbose on unhandled exceptions

  • Loading branch information...
tbeu committed Mar 28, 2018
1 parent ccc6835 commit a2b5416a12243aaf886eaff02c7a2c12b5149e8f
Showing with 8 additions and 2 deletions.
  1. +8 −2 PySimulator/Plugins/Simulator/SimulationX/SimulationX.py
@@ -204,8 +204,12 @@ def __init__(self, modelName, modelFileName, config):
self._marshalled_doc = None
print 'SimulationX: Load error.'
except win32com.client.pywintypes.com_error as error:
print 'SimulationX: COM error.'
except:
print 'SimulationX: Error.'
print 'SimulationX: Unhandled exception.'
import traceback
print traceback.format_exc()
finally:
try:
@@ -235,7 +239,9 @@ def close(self):
except win32com.client.pywintypes.com_error:
print 'SimulationX: COM error.'
except:
print 'SimulationX: Error.'
print 'SimulationX: Unhandled exception.'
import traceback
print traceback.format_exc()
finally:
SimulatorBase.Model.close(self)
if not type(sim) is types.NoneType:

0 comments on commit a2b5416

Please sign in to comment.