Changeset 17725 in trac.svn


Ignore:
Timestamp:
Sep 25, 2023, 2:13:24 AM (4 days ago)
Author:
rjollos
Message:

1.6.1dev: Merge r17650 from 1.4-stable

Refs #13515

Location:
branches/1.6-stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.6-stable

  • branches/1.6-stable/trac/notification/api.py

    r17657 r17725  
    2323from trac.core import Component, Interface, ExtensionPoint
    2424from trac.util import as_bool, lazy, to_list
     25from trac.util.text import exception_to_unicode
    2526
    2627
     
    209210        self.author = author
    210211
     212    def __repr__(self):
     213        return '<%s realm=%r, category=%r, target=%r, time=%r, author=%r>' % \
     214               (self.__class__.__name__, self.realm, self.category,
     215                self.target, self.time, self.author)
     216
    211217
    212218class NotificationSystem(Component):
     
    354360        :param event: a `NotificationEvent`
    355361        """
    356         self.distribute_event(event, self.subscriptions(event))
     362        try:
     363            self.distribute_event(event, self.subscriptions(event))
     364        except Exception as e:
     365            self.log.error("Failure distributing event %r%s", event,
     366                           exception_to_unicode(e, traceback=True))
     367            raise
    357368
    358369    def distribute_event(self, event, subscriptions):
  • branches/1.6-stable/trac/ticket/web_ui.py

    r17657 r17725  
    13481348            self.log.error("Failure sending notification on creation of "
    13491349                           "ticket #%s: %s",
    1350                            ticket.id, exception_to_unicode(e, traceback=True))
     1350                           ticket.id, exception_to_unicode(e))
    13511351            add_warning(req, tag_("The ticket has been created, but an error "
    13521352                                  "occurred while sending notifications: "
     
    13881388            except Exception as e:
    13891389                self.log.error("Failure sending notification on change to "
    1390                                "ticket #%s: %s", ticket.id,
    1391                                exception_to_unicode(e, traceback=True))
     1390                               "ticket #%s: %s",
     1391                               ticket.id, exception_to_unicode(e))
    13921392                # TRANSLATOR: The 'change' has been saved... (link)
    13931393                change = _('change')
Note: See TracChangeset for help on using the changeset viewer.