# -*- coding: utf-8 -*-
"""
Exceptions
==========
Specific exceptions that Optimus code can raise.
"""
[docs]class OptimusBaseException(Exception):
"""
Base for Optimus exceptions.
"""
pass
[docs]class DestinationExists(OptimusBaseException):
"""
Exception to be raised when a destination allready exists for a new project
to create.
"""
pass
[docs]class SettingsImportError(OptimusBaseException):
"""
Exception to be raised when a settings module import fails.
"""
pass
[docs]class TemplateImportError(OptimusBaseException):
"""
Exception to be raised when a template module import fails.
"""
pass
[docs]class TemplateSettingsInvalidError(OptimusBaseException):
"""
Exception to be raised when a template manifest have wrong settings.
"""
pass
[docs]class InvalidLangageIdentifier(OptimusBaseException):
"""
Exception to be raised from ``lang.LangBase`` when given language code is
invalid.
"""
pass
[docs]class InvalidSettings(OptimusBaseException):
"""
Exception to be raised for invalid settings from 'conf.model'
"""
pass
[docs]class ServerConfigurationError(OptimusBaseException):
"""
Exception to be raised when trying to run live server with a error in given
configuration.
"""
pass
[docs]class InvalidHostname(ServerConfigurationError):
"""
Exception to be raised when a parsed hostname is invalid.
"""
pass