Exceptions Reference

view.exceptions

__all__ = ('ViewWarning', 'NotLoadedWarning', 'ViewError', 'BadEnvironmentError', 'InvalidBodyError', 'MistakeError', 'LoaderWarning', 'AppNotFoundError', 'DatabaseError', 'InvalidDatabaseSchemaError', 'DuplicateRouteError', 'InvalidRouteError', 'ViewInternalError', 'ConfigurationError', 'NeedsDependencyError', 'InvalidTemplateError', 'TypeValidationError') module-attribute

AppNotFoundError

Bases: ViewError, FileNotFoundError

Couldn't find the app from the given path.

BadEnvironmentError

Bases: ViewError

An environment variable is missing.

ConfigurationError

Bases: ViewError

Something is wrong with the configuration.

DatabaseError

Bases: ViewError

DuplicateRouteError

Bases: ViewError

Duplicate routes in loader.

InvalidBodyError

Bases: ViewError

The specified type cannot be used as a view body.

InvalidDatabaseSchemaError

Bases: DatabaseError

InvalidRouteError

Bases: ViewError

Something is wrong with a route.

InvalidTemplateError

Bases: ViewError

Something is wrong with a template.

LoaderWarning

Bases: ViewWarning

A warning from the loader.

MistakeError

Bases: ViewError

The user made a mistake.

NeedsDependencyError

Bases: ViewError

View needs a dependency that wasn't installed.

NotLoadedWarning

Bases: ViewWarning

load() was never called

TypeValidationError

Bases: TypeError, ViewError

Could not assign the object to the target type.

ViewError

Bases: Exception

Base class for exceptions in view.py

hint = hint instance-attribute

__init__(*args: object, hint: RenderableType | None = None) -> None

ViewInternalError

Bases: ViewError

Something was wrong internally.

ViewWarning

Bases: UserWarning

Base class for all warnings in view.py