Beispiel #1
0
 def decorator(*args, **kwargs):
     controller = args[0]
     try:
         return func(*args, **kwargs)
     except ParseError as e:
         error_msg('Parser', str(e))
         controller.emergency_shutdown("Ошибка при чтении RSM")
     except FieldError as e:
         error_msg('Field', str(e))
         controller.emergency_shutdown("Ошибка при расчете модели")
     except ReportError as e:
         error_msg('Report', e.msg)
     except IOError as e:
         error_msg('Fatal', u"Ошибка чтения/записи")
     except Exception as inst:
         controller.emergency_shutdown("Неизвестная ошибка")
         logger.exception('Unknown error')
         logger.exception(type(inst))
         logger.exception(inst.args)
         information_message(u"Неизвестная ошибка. \n ",
                         caption=u"Fontaine")
         raise
Beispiel #2
0
 def error_msg(module, msg):
     logger.exception('Fatal error in ' + module + '\n' + msg)
     information_message(u'Ошибка модуля ' + module + '\n' + msg,
                     caption=u"Fontaine")
Beispiel #3
0
 def emergency_shutdown(self, message):
     logger.info("emergency shutdown initiated")
     self.view.reset()
     self.model.clear()
     information_message(message)