I need to return True Value after raise statement. Here I need to raise statement as well as it should return True value. If I use finally statement, it will not raise exception block and if I do not use finally then exception block will execute with raise statement and after that I will not able to use retcodecmd variable. Below My Code in python:
try:
something....
except ValueError:
self._retcodecmd = True
raise SomeException(something)
finally:
if self._retcodecmd is True:
return True
else:
return False