[Tutor] Error Raising (Joseph Q.)

2005-04-21 Thread Joseph Quigley
(here I go again?)
Where could I find a nice long list of the errors I can raise? (I mean like 
EOF errors when some one doesn't fill in their name when they're supposed to).

Thanks,
Joe 

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


Re: [Tutor] Error Raising (Joseph Q.)

2005-04-21 Thread Kent Johnson
Joseph Quigley wrote:
(here I go again?)
Where could I find a nice long list of the errors I can raise? (I mean 
like EOF errors when some one doesn't fill in their name when they're 
supposed to).
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
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor