On Mon, Jul 3, 2017 at 4:59 AM, Ken Kundert <python-id...@shalmirane.com>
wrote:

> That is the problem.  To write the error handler, I need the misspelled
> name.
> The only way to get it is to extract it from the error message. The need to
> unpack information that was just packed suggests that the packing was done
> too
> early.  That is my point.
>


   1. You can pass an object with all the required information and an
   appropriate __str__() method to the exception constructor.
   2. If you own the exception hierarchy, you can modify the __str__()
   method of the exception class.




-- 
Juancarlo *Añez*
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to