[log exception] log if unhandled exception was raised
@@ -4,6 +4,7 @@ from functools import wraps
from typing import Any, List, NamedTuple, Tuple, Optional, Iterable, Union, \
Callable
from typing import Dict
+import traceback
try:
from plenum.test import NO_SPIES
@@ -87,6 +88,7 @@ def spy(func, is_init, should_spy, spy_log=None):
r = func(self, *args, **kwargs)
except Exception as ex:
r = ex
+ logger.error(traceback.print_exc())
raise
finally:
bound = sig.bind(self, *args, **kwargs)
