/usr/share/pyshared/nevow/errors.py is in python-nevow 0.10.0-4build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # -*- test-case-name: nevow.test -*-
"""
Exception classes raised by Nevow.
"""
class RenderError(Exception):
"""
Base exception class for all errors which can occur during rendering.
"""
class MissingRenderMethod(RenderError):
"""
Tried to use a render method which does not exist.
@ivar element: The element which did not have the render method.
@ivar renderName: The name of the renderer which could not be found.
"""
def __init__(self, element, renderName):
RenderError.__init__(self, element, renderName)
self.element = element
self.renderName = renderName
def __repr__(self):
return '%r: %r had no renderer named %r' % (self.__class__.__name__,
self.element,
self.renderName)
class MissingDocumentFactory(RenderError):
"""
Tried to render an Element without a docFactory.
@ivar element: The Element which did not have a document factory.
"""
def __init__(self, element):
RenderError.__init__(self, element)
self.element = element
def __repr__(self):
return '%r: %r had no docFactory' % (self.__class__.__name__,
self.element)
|