"wormwood_3" <[EMAIL PROTECTED]> wrote

> Recently I was trying to do a "try: X except Y: Z" statement, 
> checking for a custom error code

>        for potdomain in self.potdomains:
>            try:
>                who.whois(potdomain)
>                self.availdomains.append(potdomain)
>            except 'NoSuchDomain':
>                pass
>            self.totalchecked+=1
>
> got a warning that throwing a string exception is deprecated,
> but the check did not work anyway.

So what did happen? Your code simply ignores the error so, for it not
to work, I assume you are still getting an error report and traceback?
If so what does it say?

Python error messages may look arcane to start with but they usually
contain enough information to identify a problem without any further
debugging - but only if we can see them! :-)

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to