In python 2.6.6, how can I capture the error message of an exception.
IE:
response_dict = {} # contains info to response under a django view. try:
Pass it through str() first.
str()
response_dict.update({'error': str(e)})
Also note that certain exception classes may have specific attributes that give the exact error.