J
John Nagle
On Dec 24, 1:24 am, Steven D'Aprano<steve
(e-mail address removed)> wrote: All I'm
How about
raise ValueError("Bad input %s to validate_arg" % (repr(arg),))
You can pass arguments to most exceptions, and the content of the
exception is determined entirely by the code raising it.
If end users are seeing uncaught tracebacks, the program is broken.
It's usually worth it to catch EnvironmentError near the outermost
level of the program, since most non program bug events, like I/O
and network errors. will raise some subclass of EnvironmentError.
John Nagle