> If the Exception is defined as a class, e will be an instance of
> that class so you can have pretty much anything available:
>
> class MyException(Exception):
> def __init__(self, msg, mylist)
> self.msg = msg
> self.mylist = mylist
> Exception.__init__(self, msg)
>
On Thu, Apr 05, 2007, Mike Hansen wrote:
>When doing a try/except block, is it possible to return a list as part
>of the exception?
>
>try:
>check_someting()
>except CheckSomethingError, e:
>for each_error in e:
> # do something
>
>Can 'e' be a list of errors? If so, how do you constr
When doing a try/except block, is it possible to return a list as part
of the exception?
try:
check_someting()
except CheckSomethingError, e:
for each_error in e:
# do something
Can 'e' be a list of errors? If so, how do you construct your exception
class?
Is it better to do it l
On 17/12/06, Asrarahmed Kadri <[EMAIL PROTECTED]> wrote:
Hi Folks,
Is it possible to catch exception raised in module A to be caught in
module B.
If yes, then please let me know how to do it.
You can easily test this yourself. First right a quick module, something
like this will do:
def e
Hi Folks,
Is it possible to catch exception raised in module A to be caught in module
B.
If yes, then please let me know how to do it.
TIA.
Regards,
Asrarahmed Kadri
--
To HIM you shall return.
___
Tutor maillist - Tutor@python.org
http://mail.p