[Tutor] throwing exception across modules?

James Hartley jjhartley at gmail.com
Thu Sep 8 16:08:07 CEST 2011


This is more a design question.

One lesson C++ programmers might learn is that throwing exceptions from
within library code is fraught with problems because the internals of
exception handling were spelled out in the C++ standard.  This manifests
itself as problems when the library was compiled with one vendor's compiler,
but the user of the library is using another compiler.

While I understand that Python doesn't suffer from this exact problem, are
there other reasons that raising exceptions in a module only be caught by
consumers of the module a bad idea?

Any insight which can be shared would be most appreciated.

Thanks.

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110908/f238cd8a/attachment.html>


More information about the Tutor mailing list