comparison frontends/src/wix/main_window.py @ 1063:6ec513ad92c2

frontends: async failures are more detailed (full class name + error message)
author souliane <souliane@mailoo.org>
date Sat, 07 Jun 2014 15:39:20 +0200
parents aa15453ec54d
children 11e2bb20e896
comparison
equal deleted inserted replaced
1062:95758ef3faa8 1063:6ec513ad92c2
254 wx.OK | wx.ICON_ERROR 254 wx.OK | wx.ICON_ERROR
255 ) 255 )
256 dlg.ShowModal() 256 dlg.ShowModal()
257 dlg.Destroy() 257 dlg.Destroy()
258 def action_eb(failure): 258 def action_eb(failure):
259 dlg = wx.MessageDialog(self, unicode(failure), 259 dlg = wx.MessageDialog(self, failure.message,
260 _('Error'), 260 failure.fullname,
261 wx.OK | wx.ICON_ERROR 261 wx.OK | wx.ICON_ERROR
262 ) 262 )
263 dlg.ShowModal() 263 dlg.ShowModal()
264 dlg.Destroy() 264 dlg.Destroy()
265 265
409 log.debug(_("Param request")) 409 log.debug(_("Param request"))
410 def success(params): 410 def success(params):
411 XMLUI(self, xml_data=params, title=_("Configuration")) 411 XMLUI(self, xml_data=params, title=_("Configuration"))
412 412
413 def failure(error): 413 def failure(error):
414 dlg = wx.MessageDialog(self, unicode(error), 414 dlg = wx.MessageDialog(self, error.message,
415 _('Error'), 415 error.fullname,
416 wx.OK | wx.ICON_ERROR 416 wx.OK | wx.ICON_ERROR
417 ) 417 )
418 dlg.ShowModal() 418 dlg.ShowModal()
419 dlg.Destroy() 419 dlg.Destroy()
420 self.bridge.getParamsUI(app=Const.APP_NAME, profile_key=self.profile, callback=success, errback=failure) 420 self.bridge.getParamsUI(app=Const.APP_NAME, profile_key=self.profile, callback=success, errback=failure)