Niels Albers <nralb...@gmail.com> added the comment:

Thanks Srinivas for the suggestion. IMO exception chaining has more utility 
than only dealing with new exceptions that are caused by exception handling. 
It's all about preserving exception context. As both a writer of libraries and 
a user of such, I do like to have a full context chain when I have to handle an 
exception (or more importantly as a devops engineeer: log it)

Is this edit acceptable?

"If you need to track exception context, you can use exception chaining. You 
can chain exceptions by using the ``from`` clause. Just raise a new exception 
class or instance from an existing exception. The existing exception will be 
set as 
the cause for the new exception."

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37891>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to