Merge branch 'release/0.9.2'
[philo.git] / philo / exceptions.py
1 from django.core.exceptions import ImproperlyConfigured
2
3
4 #: Raised if ``request.node`` is required but not present. For example, this can be raised by :func:`philo.views.node_view`. :data:`MIDDLEWARE_NOT_CONFIGURED` is an instance of :exc:`django.core.exceptions.ImproperlyConfigured`.
5 MIDDLEWARE_NOT_CONFIGURED = ImproperlyConfigured("""Philo requires the RequestNode middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'philo.middleware.RequestNodeMiddleware'.""")
6
7
8 class ViewDoesNotProvideSubpaths(Exception):
9         """Raised by :meth:`.View.reverse` when the :class:`.View` does not provide subpaths (the default)."""
10         silent_variable_failure = True
11
12
13 class ViewCanNotProvideSubpath(Exception):
14         """Raised by :meth:`.View.reverse` when the :class:`.View` can not provide a subpath for the supplied arguments."""
15         silent_variable_failure = True
16
17
18 class AncestorDoesNotExist(Exception):
19         """Raised by :meth:`.TreeEntity.get_path` if the root instance is not an ancestor of the current instance."""
20         pass