'Raise an exception indicating that a value cannot be
accepted.
`type_error` indicates whether the error is due to a type
mismatch rather than a malformed value. In this case, a more
specific exception is raised.'

def fail(self, message, view, type_error=False):

    exc_class = (ConfigTypeError if type_error else ConfigValueError)
    raise exc_class(u'{0}:    {1}'.format(view.name, message))
