def _try_call(func, extra_exceptions=(), return_exceptions=False):
    """
    Call a method, but
    :param func:
    :type func:
    :param extra_exceptions:
    :type extra_exceptions:
    :return:
    :rtype:
    """
    try:
        return func()
    except HANDLED_EXCEPTIONS as e:
        if return_exceptions:
            return e
        else:
            return _format_exception(e)
    except extra_exceptions as e:
        if return_exceptions:
            return e
        else:
            return _format_exception(e)
def _try_call(func, extra_exceptions=(), return_exceptions=False):
    """
    Call a method, but
    :param func:
    :type func:
    :param extra_exceptions:
    :type extra_exceptions:
    :return:
    :rtype:
    """
    try:
        return func()
    except HANDLED_EXCEPTIONS as e:
        if return_exceptions:
            return e
        else:
            return _format_exception(e)
    except extra_exceptions as e:
        if return_exceptions:
            return e
        else:
            return _format_exception(e)
def _try_call ( func , extra_exceptions = ( ) , return_exceptions = False ) : try : return func ( ) except HANDLED_EXCEPTIONS as e : if return_exceptions : return e else : return _format_exception ( e ) except extra_exceptions as e : if return_exceptions : return e else : return _format_exception ( e )
Call a method, but
    :param func:
    :type func:
    :param extra_exceptions:
    :type extra_exceptions:
    :return:
    :rtype:
Call a method but : param func : : type func : : param extra_exceptions : : type extra_exceptions : : return : : rtype :