[Tutor] Re: Error Raising

Joseph Quigley cpu.crazy at gmail.com
Thu Apr 21 16:43:28 CEST 2005


Ahh. I really like the ability to make my own exceptions. This info will 
help alot.
Thanks,
         Joe
PS. Would the Tutorial included with IDLE be the same as the site's docs?


>The standard (built-in) exceptions are documented here:
>http://docs.python.org/lib/module-exceptions.html
>
>If you don't find any that suit you, defining your own is as easy as
>
>class MyException(Exception):
>    pass
>
>....
>try:
>    raise MyException
>except MyException:
>    ...
>
>Kent



More information about the Tutor mailing list