<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 5/6/2016 7:57 PM, INADA Naoki wrote:<br>
</div>
<blockquote
cite="mid:CAEfz+Tyk9cuc2E3MpxAhnXSu=GjVh3Zc168ii+Nspvw50SgB=g@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_quote">If many functions have catch clause,
it's a very bad code smell.<br>
</div>
</div>
</blockquote>
<br>
This is interesting, and the ?fourth? time it was alluded to! Maybe
the lack of `try` statements is common, and people can still debug
problems despite the loss of causes and stack traces. <br>
<br>
Another discussion made me realize what I am doing differently: My
problems may be unique because of multi-threaded code and logging.
I have programmed using multiple threads for a very long time, and
have been catching my exceptions early-and-often so they, and their
causes, are in a single structure. My exceptions are emitted to the
log (with all causes and traces) all at once or not at all. This is
necessary when multiple threads are writing to the log; writing out
of order, and interlacing with other threads' log lines. Now, I
mostly write Python, but I still spawn many threads despite the
GIL. My exception handling strategy, and my logging strategy, has
not changed. <br>
<br>
I see now. The log generated by a single thread would be much more
readable, with cause preceding effect, and without obfuscating lines
from other threads.<br>
</body>
</html>