I have a use case that requires passing a dictionary in a try/exception clause in Python 3.x
The error message can be accessed as a string using str() function, but I can't figure out who to get it as a dictionary.
try:
raise RuntimeError({'a':2})
except Exception as e:
error = e
print(error['a'])
e is a RuntimeError object and I can't find any method that returns the message in its original format.