examples/advanced/raise_my_exception.py
class MyError(Exception):
    pass

try:
    raise(MyError('hello', 'world'))
except Exception as e:
    print(type(e))
    print(e)
    print(e.args)

examples/advanced/raise_my_exception.err
<class '__main__.MyError'>
('hello', 'world')
('hello', 'world')