[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - TALES.py:1.1.2.7
Fred L. Drake, Jr.
fdrake@acm.org
Wed, 27 Feb 2002 17:48:18 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv22012
Modified Files:
Tag: Zope-3x-branch
TALES.py
Log Message:
Do not lose information from the exception message by defining a
minimally-different version of the exception's __str__().
=== Zope3/lib/python/Zope/PageTemplate/TALES.py 1.1.2.6 => 1.1.2.7 ===
class Undefined(TALESError):
'''Exception raised on traversal of an undefined path'''
- def __str__(self):
- if self.type is None:
- s = self.expression
- else:
- s = '%s not found in %s' % (self.value,
- `self.expression`)
- if self.lineno is not None:
- s = "%s, at line %d" % (s, self.lineno)
- if self.offset is not None:
- s = "%s, column %d" % (s, self.offset + 1)
- return s
class RegistrationError(Exception):
'''TALES Type Registration Error'''