Raising an exception

This is how exceptions may be raised.

#!/usr/local/bin/python

try:
    raise Exception('good', 'morning')
except Exception as e:
    print( type(e))     # the exception instance
    print( e)           # __str__ allows args to printed directly
    a, b = e            # __getitem__ allows args to be unpacked directly
    print( a, b)