[Pki-devel] [PATCH] 57 On error, raise an Exception rather than use sys.exit - #562
Endi Sukma Dewata
edewata at redhat.com
Tue May 21 01:16:38 UTC 2013
On 5/16/2013 2:05 PM, Abhishek Koneru wrote:
> Please review the patch which replaces all sys.exits() calls with raise
> Exception statements, so that the caller can handle the exception.
Just one thing, in pkimanifest.py and pkiparser.py the original
exception is discarded and new exception is raised. In general it would
be better to re-throw the original exception, unless there's a specific
reason (e.g. to hide low level details).
ACK with above issue fixed.
This is for future enhancement. In places where the sys.exit() was
removed, the code logs an error message, then it throws an exception
containing the same error message. It would be better to remove the
logging code from these locations, then log the error in the main program.
--
Endi S. Dewata
More information about the Pki-devel
mailing list