class MyError(Exception):
    __module__ = None

def __init__(self, *args, **kwargs):
    Exception.__init__(self, *args, **kwargs)
self.__class__.__name__ = 'CustomTextHere'
How to customize exception message