pyramid.exceptions

exception BadCSRFOrigin(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[ソース]

This exception indicates the request has failed cross-site request forgery origin validation.

exception BadCSRFToken(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[ソース]

This exception indicates the request has failed cross-site request forgery token validation.

exception PredicateMismatch(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[ソース]

This exception is raised by multiviews when no view matches all given predicates.

This exception subclasses the HTTPNotFound exception for a specific reason: if it reaches the main exception handler, it should be treated as HTTPNotFound` by any exception view registrations. Thus, typically, this exception will not be seen publicly.

However, this exception will be raised if the predicates of all views configured to handle another exception context cannot be successfully matched. For instance, if a view is configured to handle a context of HTTPForbidden and the configured with additional predicates, then PredicateMismatch will be raised if:

  • An original view callable has raised HTTPForbidden (thus invoking an exception view); and

  • The given request fails to match all predicates for said exception view associated with HTTPForbidden.

The same applies to any type of exception being handled by an exception view.

Forbidden

:py:class:`pyramid.httpexceptions.HTTPForbidden`の別名です。

NotFound

:py:class:`pyramid.httpexceptions.HTTPNotFound`の別名です。

exception ConfigurationError[ソース]

Raised when inappropriate input values are supplied to an API method of a Configurator

exception URLDecodeError[ソース]

This exception is raised when Pyramid cannot successfully decode a URL or a URL path segment. This exception behaves just like the Python builtin UnicodeDecodeError. It is a subclass of the builtin UnicodeDecodeError exception only for identity purposes, mostly so an exception view can be registered when a URL cannot be decoded.