[Tutor] Nicer error message

Válas Péter sulinet at postafiok.hu
Tue May 31 17:34:08 CEST 2011


2011/5/31 Steven D'Aprano <steve at pearwood.info>

> You should inherit exceptions from the Exception class:
>
OK, as a matter of fact, it was not Error, it was the own error class of a
bigger program, I just wanted to substitute it with the root object by
heart, and I was wrong, sorry.


> Only built-in exceptions don't print the module name.
> You just have to live with it.
>
> Thank you, this is what I wanted to know. Raising an error is better than
to write anything, becuse it gives traceback and line number.

Péter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110531/9ffebe82/attachment.html>


More information about the Tutor mailing list