Modify

Opened 16 months ago

Last modified 13 months ago

#11153 new defect

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

Reported by: rjollos Owned by: rjollos
Priority: normal Component: ChangeLogMacro
Severity: normal Keywords:
Cc: hasienda Trac Release:

Description (last modified by rjollos)

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 rjollos 15 months ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 16 months ago by rjollos

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

Changed 15 months ago by rjollos

comment:2 Changed 13 months ago by rjollos

  • Description modified (diff)

comment:3 Changed 13 months ago by rjollos

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.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.