Example #1
0
 def _on_register_error(self, widget, msg, exc_info):
     if exc_info:
         formatted_msg = utils.format_exception(exc_info, msg)
         self.set_error(formatted_msg)
     else:
         log.error(msg)
         self.set_error(msg)
Example #2
0
 def handle_register_exception(self, obj, msg, exc_info):
     if isinstance(exc_info[1], registergui.RemoteUnregisterException):
         # Don't show a message box when we cannot unregister from the server
         # Instead log the exception
         log.exception(exc_info[1])
         return
     message = format_exception(exc_info, msg)
     self.error_dialog(message)
Example #3
0
 def handle_register_exception(self, obj, msg, exc_info):
     # We are checking to see if exc_info seems to have come from
     # a call to sys.exc_info()
     # (likely somewhere in registergui.AsyncBackend)
     # See bz 1395662 for more info
     if isinstance(exc_info, tuple) and \
        isinstance(exc_info[1], registergui.RemoteUnregisterException):
         # Don't show a message box when we cannot unregister from the server
         # Instead log the exception
         log.exception(exc_info[1])
         return
     message = format_exception(exc_info, msg)
     self.error_dialog(message)
Example #4
0
 def handle_register_exception(self, obj, msg, exc_info):
     # We are checking to see if exc_info seems to have come from
     # a call to sys.exc_info()
     # (likely somewhere in registergui.AsyncBackend)
     # See bz 1395662 for more info
     if isinstance(exc_info, tuple) and \
        isinstance(exc_info[1], registergui.RemoteUnregisterException):
         # Don't show a message box when we cannot unregister from the server
         # Instead log the exception
         log.exception(exc_info[1])
         return
     message = format_exception(exc_info, msg)
     self.error_dialog(message)
Example #5
0
    def _on_register_error(self, widget, msg, exc_info):
        """Handler for RegisterWidget's 'register-error' signal.

        Depending on the data passed to 'register-error' emission, this
        widgets decides how to format the error 'msg'. The 'msg' may
        need to use format_exception to including exception info
        in the msg (ie, the exception msg or status code).

        This uses initial-setups set_error() to display the error
        messages. Currently that is via a Gtk.InfoBar."""

        if exc_info:
            formatted_msg = gui_utils.format_exception(exc_info, msg)
            self.set_error(formatted_msg)
        else:
            log.error(msg)
            self.set_error(msg)
Example #6
0
    def _on_register_error(self, widget, msg, exc_info):
        """Handler for RegisterWidget's 'register-error' signal.

        Depending on the data passed to 'register-error' emission, this
        widgets decides how to format the error 'msg'. The 'msg' may
        need to use format_exception to including exception info
        in the msg (ie, the exception msg or status code).

        This uses initial-setups set_error() to display the error
        messages. Currently that is via a Gtk.InfoBar."""

        if exc_info:
            formatted_msg = gui_utils.format_exception(exc_info, msg)
            self.set_error(formatted_msg)
        else:
            log.error(msg)
            self.set_error(msg)
 def handle_register_exception(self, obj, msg, exc_info):
     message = format_exception(exc_info, msg)
     self.error_dialog(message)
Example #8
0
 def handle_register_exception(self, obj, msg, exc_info):
     message = format_exception(exc_info, msg)
     self.error_dialog(message)