sunrays123
8 years agoOccasional Contributor
Exception error is not printing
def verify_saved_threshold_properties(fileName):
bResult = False
failureCount = 0
:
try:
:
for i in range(0, aString.Length):
str = aString.GetValue(i)
for key, val in threshold_dict.items():
if str.contains(key):
if str.contains(mapped_value):
Log.Message(mapped_value + " value is present in saved setting dialog against {0} ".format(key))
break
else:
failureCount += 1
Log.Message(mapped_value + " value is not present in saved setting dialog against {0}".format(key))
else:
continue
bResult = False if failureCount > 0 else True
else:
:
bResult = False
except AttributeError as error:
Log.Error(__name__ + " error!! " + str(error))
except Exception as error:
Log.Error(__name__ + " error!! " + str(error))
bResult = True
finally:
return bResultHi, All I am using a python script and trying to print exception error, but unfortunately, it is not printing. In the above code, an AttributeError exception is caught but the message is not logged.
Can somebody please help?