Exceptions hierarchy

### Navigation

- index
- next |
- previous |
- fantastico 0.1.0-b1 documentation »
- Fantastico features »

# Exceptions hierarchy

class `fantastico.exceptions.` `FantasticoError`

  FantasticoError is the base of all exceptions raised within fantastico framework. It describe common attributes that each concrete fantastico exception must provide. By default all fantastico exceptions inherit FantasticoError exception. We do this because each raised unhandled FantasticoError is map to a specific exception response. This strategy guarantees that at no moment errors will cause fantastico framework wsgi container to crash.

class `fantastico.exceptions.` `FantasticoControllerInvalidError`

  This exception is raised whenever a method is decorated with `fantastico.mvc.controller_decorators.Controller` and the number of arguments is not correct. Usually developer forgot to add request as argument to the controller.

class `fantastico.exceptions.` `FantasticoClassNotFoundError`

  This exception is raised whenever code tries to dynamically import and instantiate a class which can not be resolved.

class `fantastico.exceptions.` `FantasticoNotSupportedError`

  This exception is raised whenever code tries to do an operation that is not supported.

class `fantastico.exceptions.` `FantasticoSettingNotFoundError`

  This exception is raised whenever code tries to obtain a setting that is not available in the current fantastico configuration.

class `fantastico.exceptions.` `FantasticoDuplicateRouteError`

  This exception is usually raised by routing engine when it detects duplicate routes.

class `fantastico.exceptions.` `FantasticoNoRoutesError`

  This exception is usually raised by routing engine when no loaders are configured or no routes are registered.

class `fantastico.exceptions.` `FantasticoRouteNotFoundError`

  This exception is usually raised by routing engine when a requested url is not registered.

class `fantastico.exceptions.` `FantasticoNoRequestError`

  This exception is usually raised when some components try to use fantastico.request from WSGI environ before `fantastico.middleware.request_middleware.RequestMiddleware` was executed.

class `fantastico.exceptions.` `FantasticoContentTypeError`

  This exception is usually thrown when a mismatch between request accept and response content type. In Fantastico we think it’s mandatory to fulfill requests correctly and to take in consideration sent headers.

class `fantastico.exceptions.` `FantasticoHttpVerbNotSupported`(http_verb)

  This exception is usually thrown when a route is accessed with an http verb which does not support.

  `http_verb`

    This property returns the http verb that caused the problems.

class `fantastico.exceptions.` `FantasticoTemplateNotFoundError`

  This exception is usually thrown when a controller tries to load a template which it does not found.

class `fantastico.exceptions.` `FantasticoIncompatibleClassError`

  This exception is usually thrown when we want to decorate / inject / mixin a class into another class that does not support it. For instance, we want to build a `fantastico.mvc.model_facade.ModelFacade` with a class that does not extend BASEMODEL.

class `fantastico.exceptions.` `FantasticoDbError`

  This exception is usually thrown when a database exception occurs. For one good example where this is used see `fantastico.mvc.model_facade.ModelFacade`.

class `fantastico.exceptions.` `FantasticoDbNotFoundError`

  This exception is usually thrown when an entity does not exist but we try to update it. For one good example where this is used see `fantastico.mvc.model_facade.ModelFacade`.