'This method returns a new subclass of the exception provided that
also is a subclass of `BadRequest`.'

@classmethod
def wrap(cls, exception, name=None):

    class newcls(cls, exception, ):
        def __init__(self, arg=None, *args, **kwargs):
            cls.__init__(self, *args, **kwargs)
            exception.__init__(self, arg)
    newcls.__module__ = sys._getframe(1).f_globals.get('__name__')
    newcls.__name__ = (name or (cls.__name__ + exception.__name__))
    return newcls
