TYPE_MISMATCH_MESSAGE = 'Wrong data type "%s" encountered for cell "%s". Expected data type is "%s"'


DB00001 = 'Mapping table %s not created for the model %s.'
DB00002 = 'Foreign key Column %s not found in the table %s for the model %s.'

class DbError (RuntimeError):
    def __init__(self, message):
        self.message = message
    def __str__(self):
        return self.message

class DataTypeError(DbError):
    def __init__(self, value):
        self.value = value
    def __str__(self):
        return repr(self.value)

class MappingError(DbError):
    def __init__(self, value):
        self.value = value
    def __str__(self):
        return repr(self.value)
