"""
Mother Exceptions.
"""

class MotherException(Exception):
    def __init__(self,value):
        self.value=value
    def __str__(self):
        return self.value

class QueryError(MotherException):
    def __init__(self,value=''):
        MotherException.__init__(self,
                    "Query error - "+str(value))

class ConnectionError(MotherException):
    def __init__(self):
        MotherException.__init__(self,
                    "Broken Connection :(")

class InsertError(MotherException):
    def __init__(self,value=""):
        MotherException.__init__(self,
                    "Cannot insert - "+str(value))

class SelectError(MotherException):
    def __init__(self,value=""):
        MotherException.__init__(self,
                    "Cannot select - "+str(value))

class UpdateError(MotherException):
    def __init__(self,value=""):
        MotherException.__init__(self,
                    "Cannot update - "+str(value))

class DeleteError(MotherException):
    def __init__(self,value=""):
        MotherException.__init__(self,
                    "Cannot delete - "+str(value))

class InternalError(MotherException):
    def __init__(self,value=""):
        MotherException.__init__(self,
                    "Internal error - "+str(value))

class WrongTypeError(MotherException):
    def __init__(self,value=""):
        MotherException.__init__(self,str(value))
        
