>>> def catch(): ... try: ... asd() ... except Exception as e: ... print e.message, e.args ... >>> catch() global name 'asd' is not defined ("global name 'asd' is not defined",)