I want to know if there would be a way to catch exceptions inside called methods.
Example:
def foo(value):
print value
foo(x)
This would throw a NameError exception, because x is not declared. I'd like to catch this NameError exception inside foo method. Is there a way?