You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importloggingfromaiohttpimportweb_exceptionsdeff():
try:
raiseException('hi mom')
exceptExceptionase:
raiseweb_exceptions.HTTPBadRequest(reason='chaining an exception from hi mom')
try:
f()
exceptExceptionase:
logging.exception(e)
outputs
ERROR:root:chaining an exception from hi mom
Traceback (most recent call last):
File "<ipython-input-4-6ec4e29d6e22>", line 11, in <module>
f()
File "<ipython-input-4-6ec4e29d6e22>", line 8, in f
raise web_exceptions.HTTPBadRequest(reason='chaining an exception from hi mom')
aiohttp.web_exceptions.HTTPBadRequest: chaining an exception from hi mom
This probably has to do with HTTPException deriving from Response
Expected behaviour
It would be nice to also see the underlying exceptions...
defg():
try:
raiseException('hi mom2')
exceptExceptionase:
raiseValueError('chaining a normal exception from hi mom2')
try:
g()
exceptExceptionase:
logging.exception(e)
which outputs
ERROR:root:chaining a normal exception from hi mom2
Traceback (most recent call last):
File "<ipython-input-6-2590806aa1fb>", line 3, in g
raise Exception('hi mom2')
Exception: hi mom2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<ipython-input-6-2590806aa1fb>", line 7, in <module>
g()
File "<ipython-input-6-2590806aa1fb>", line 5, in g
raise ValueError('chaining a normal exception from hi mom2')
ValueError: chaining a normal exception from hi mom2
Your environment
aiohttp 3.3.2
python 3.7
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new
Long story short
Example of badness:
outputs
This probably has to do with
HTTPException
deriving fromResponse
Expected behaviour
It would be nice to also see the underlying exceptions...
which outputs
Your environment
aiohttp 3.3.2
python 3.7
The text was updated successfully, but these errors were encountered: