You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/07 10:07:41 UTC
[GitHub] [airflow] ashb commented on pull request #20731: Avoid printing a stacktrace for 'AirflowException'-derived errors
ashb commented on pull request #20731:
URL: https://github.com/apache/airflow/pull/20731#issuecomment-1007286352
Another option:
```python
try:
r()
except:
(t,v,tb) = sys.exc_info()
tb.tb_next = None
logging.exception("boom", exc_info=(t,v,tb))
```
Produces
```
ERROR:root:boom
Traceback (most recent call last):
File "<ipython-input-11-449d6688bb3b>", line 3, in run2
r()
RuntimeError: a
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org