'Catch an exception and raise it unless asked to ignore it.
:keyword  ignore_errors: If true, just return the error.  Otherwise,
raise the error.
:type     ignore_errors: ``bool``
:return:  The exception that was raised.
:rtype:   :class:`Exception`'

def _catch_error(self, ignore_errors=False):

    e = sys.exc_info()[1]
    if ignore_errors:
        return e
    else:
        raise e
