[issue41399] Add stacklevel support for exceptions

2020-07-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

warnings.warn(), the function which emits warnings, has the stacklevel 
parameter. But how do you provide stacklevel for exceptions?

See also bpo-39725.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41399] Add stacklevel support for exceptions

2020-07-26 Thread wyz23x2


New submission from wyz23x2 :

Now warnings.warn supports a stacklevel parameter. But many users want 
exceptions to support it too.
Related:
https://stackoverflow.com/questions/34175111/raise-an-exception-from-a-higher-level-a-la-warnings

--
components: Interpreter Core
messages: 374308
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Add stacklevel support for exceptions
type: enhancement
versions: Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com