2015-03-13 18:31:07 +03:00
|
|
|
"""Errors module."""
|
|
|
|
|
|
|
|
|
|
|
|
class Error(Exception):
|
2015-11-15 00:43:42 +03:00
|
|
|
"""Base error.
|
|
|
|
|
|
|
|
All dependency injector errors extend this error class.
|
|
|
|
"""
|
2015-11-11 20:14:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
class UndefinedProviderError(Error, AttributeError):
|
2015-11-15 00:43:42 +03:00
|
|
|
"""Undefined provider error.
|
|
|
|
|
|
|
|
This error is used when provider could not be defined, for example:
|
|
|
|
|
|
|
|
- provider with certain name could not be defined
|
|
|
|
- catalog's name of the certain provider could not be defined
|
|
|
|
- etc...
|
|
|
|
|
|
|
|
Also this error extends standard :py:class:`AttributeError`. This gives
|
|
|
|
possibility to use it correctly with ``__getattr__()``.
|
|
|
|
"""
|