Opened 5 years ago

Closed 3 years ago

#11153 closed defect (fixed)

Catch exception and render more subtle message when node doesn't exist

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: ChangeLogMacro
Severity: normal Keywords:
Cc: Steffen Hoffmann Trac Release:

Description (last modified by Ryan J Ollos)

When the path in ChangeLogMacro's argument points to non-existing node, we should raise a more subtle message than (captured from GoogleMapMacro@44#RecentChangesintheDevelopBranch):

Attachments (1)

NoNode.png (9.4 KB) - added by Ryan J Ollos 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by Ryan J Ollos

(I will have to upload the attachment later due to #11151)

Changed 5 years ago by Ryan J Ollos

Attachment: NoNode.png added

comment:2 Changed 5 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 5 years ago by Ryan J Ollos

Another issue is that we end up with errors in the logs,

2013-08-16 04:24:51,138 Trac[formatter] ERROR: Macro ChangeLog(googlemapmacro/dev/, 3) failed:
Traceback (most recent call last):
  File "/srv/", line 765, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "/srv/", line 356, in process
    text = self.processor(text)
  File "/srv/", line 343, in _macro_processor
  File "/srv/", line 123, in expand_macro
    node = repo.get_node(path, rev)
  File "/srv/", line 291, in get_node
    return self.repos.get_node(path, self.normalize_rev(rev))
  File "/srv/", line 481, in get_node
    return SubversionNode(path, rev, self, self.pool)
  File "/srv/", line 733, in __init__
    raise NoSuchNode(path, rev)
NoSuchNode: No node googlemapmacro/dev at revision 13353

I wonder if we really want the logs filled with errors due to invalid macro calls.

comment:4 Changed 3 years ago by Ryan J Ollos

Status: newaccepted

comment:5 Changed 3 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 14507:

0.3: Avoid traceback in log at debug level 'error'.

Exception is tapped and system_message rendered when node is not found. Fixes #11153.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.