Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12542 closed defect (fixed)

Trap InvalidQuery exceptions

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: TagsPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description (last modified by Ryan J Ollos)

We should trap and log InvalidQuery exceptions:

2015-10-17 22:28:10,513 Trac[formatter] ERROR: Macro ListTagged(real:wiki pending-deletion) failed:
Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 789, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 358, in process
    text = self.processor(text)
  File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 342, in _macro_processor
    text, self.args)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.8dev-py2.6.egg/tractags/macros.py", line 261, in expand_macro
    results = sorted(query_result, key=lambda r: \
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.8dev-py2.6.egg/tractags/api.py", line 436, in query
    if query(tags, context=resource):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.8dev-py2.6.egg/tractags/query.py", line 269, in __call__
    return self.match(self, terms, context)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.8dev-py2.6.egg/tractags/query.py", line 293, in match
    return _match(node)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.8dev-py2.6.egg/tractags/query.py", line 279, in _match
    return _match(node.left) and _match(node.right)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.8dev-py2.6.egg/tractags/query.py", line 279, in _match
    return _match(node.left) and _match(node.right)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.8dev-py2.6.egg/tractags/query.py", line 288, in _match
    )(node.left.value, node.right, context)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.8dev-py2.6.egg/tractags/query.py", line 427, in _invalid_handler
    raise InvalidQuery(_("Invalid attribute '%s'") % name)
InvalidQuery: Invalid attribute 'real'

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 15562:

0.9dev: Return system message for invalid arguments to ListTagged macro

Fixes #12542.

comment:3 Changed 9 years ago by Ryan J Ollos

Owner: changed from Steffen Hoffmann to Ryan J Ollos

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.