examples/advanced/raise_named_exception.py
a = 2

try:
    a + b
except Exception as e:
    print(type(e))
    print(e)
    print(e.args)

try:
   raise(NameError('something else'))
except Exception as e:
    print(type(e))
    print(e)
    print(e.args)
    
examples/advanced/raise_named_exception.err
<type 'exceptions.NameError'>
name 'b' is not defined
("name 'b' is not defined",)
<type 'exceptions.NameError'>
something else
('something else',)