Source code for stalker.core.errors
#-*- coding: utf-8 -*-
"""Errors for the system.
This module contains the Errors in Stalker.
"""
########################################################################
[docs]class LoginError(Exception):
"""Raised when the login information is not correct or not correlate with the data in the database.
"""
#----------------------------------------------------------------------
def __init__(self, value=""):
super(LoginError, self).__init__(value)
self.value = value
#----------------------------------------------------------------------
def __str__(self):
return repr(self.value)
########################################################################
[docs]class DBError(Exception):
"""Raised when there is no database and a database related action has been placed.
"""
#----------------------------------------------------------------------
def __init__(self, value=""):
super(DBError, self).__init__(value)
self.value = value
#----------------------------------------------------------------------
def __str__(self):
return repr(self.value)
########################################################################
[docs]class CircularDependencyError(Exception):
"""Raised when there is cirular dependencies within Tasks
"""
#----------------------------------------------------------------------
def __init__(self, value=""):
super(CircularDependencyError, self).__init__(value)
self.value = value
#----------------------------------------------------------------------
def __str__(self):
return repr(self.value)