Modify

Opened 12 years ago

Closed 10 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 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by Ryan J Ollos

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

Changed 11 years ago by Ryan J Ollos

Attachment: NoNode.png added

comment:2 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 11 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/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 765, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 356, in process
    text = self.processor(text)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 343, in _macro_processor
    text)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/ChangeLogMacro-0.2_r12377-py2.6.egg/changelog/ChangeLogMacro.py", line 123, in expand_macro
    node = repo.get_node(path, rev)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/versioncontrol/cache.py", line 291, in get_node
    return self.repos.get_node(path, self.normalize_rev(rev))
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/tracopt/versioncontrol/svn/svn_fs.py", line 481, in get_node
    return SubversionNode(path, rev, self, self.pool)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/tracopt/versioncontrol/svn/svn_fs.py", 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 10 years ago by Ryan J Ollos

Status: newaccepted

comment:5 Changed 10 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
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.