def get_exception_kwargs(e):
    """ Extracts extra info (attributes) from an exception object. """
    kwargs = {}
    for attr, value in vars(e).items():
        if not attr.startswith('_') and attr not in ('args', 'message'):
            kwargs[attr] = value
    return kwargs