Hi,

I have implemented PEP 3134 exception reporting in 
http://bugs.python.org/issue3112
The code is fully functional but it needs a final clean-up and that clean-up
is awaiting answers to the following questions:

1) API visibility: should we expose a function PyErr_DisplaySingle in order 
to display an exception without chaining (while PyErr_Display displays
all chained exceptions)?

2) API change: should those two functions (PyErr_Display / PyErr_DisplaySingle)
be changed to return an integer result (0: success, -1: failure)? In any case
they would continue swallow all errors, the result code would just be a means
for the calling code to know whether everything went well.

3) Optional question: should be harmonize traceback formatting between built-in
reporting and reporting through traceback.py? Right now there is a small 
discrepancy in code lines indentation, see:

With built-in reporting:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "f.py", line 22, in raise_cause
inner_raise_cause()
  File "f.py", line 13, in inner_raise_cause
raise KeyError from e
KeyError

With traceback.py:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "f.py", line 22, in raise_cause
    inner_raise_cause()
  File "f.py", line 13, in inner_raise_cause
    raise KeyError from e
KeyError


Thanks in advance for your advice

Antoine.


_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to