[lug] Python: Unable to catch subprocess error

Rob Nagler nagler at bivio.biz
Sat Mar 10 10:06:21 MST 2018


On Sat, Mar 10, 2018 at 9:34 AM, Jed S. Baer wrote:
>
> But note, "Unless you re-raise the exception right away". Which makes
> perfect sense. At least to me.


I would say that's what "finally" is for. There are fewer error cases this
way (like accidentally forgetting the "raise").

If you want to examine the exception, you might want to look at traceback
and sys.exc_info, which are available in "finally".

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180310/5ca1f3e4/attachment-0001.html>


More information about the LUG mailing list