@util.log_errors<EOL><INDENT>def dispatch_notification(self, msg):<DEDENT>
try:<EOL><INDENT>idents,msg = self.session.feed_identities(msg)<EOL><DEDENT>except ValueError:<EOL><INDENT>self.log.warn("<STR_LIT>",msg)<EOL>return<EOL><DEDENT>try:<EOL><INDENT>msg = self.session.unserialize(msg)<EOL><DEDENT>except ValueError:<EOL><INDENT>self.log.warn("<STR_LIT>"%idents)<EOL>return<EOL><DEDENT>msg_type = msg['<STR_LIT>']['<STR_LIT>']<EOL>handler = self._notification_handlers.get(msg_type, None)<EOL>if handler is None:<EOL><INDENT>self.log.error("<STR_LIT>"%msg_type)<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>handler(cast_bytes(msg['<STR_LIT:content>']['<STR_LIT>']))<EOL><DEDENT>except Exception:<EOL><INDENT>self.log.error("<STR_LIT>", msg, exc_info=True)<EOL><DEDENT><DEDENT>
dispatch register/unregister events.