Can you send me the output for an OLE error? The correct syntax should be included in the error message like this:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

TypeError would be the exception so you would have:

try: None + "foo"
except: TypeError


On 7/14/05, Bernard Lebel < [EMAIL PROTECTED]> wrote:
Hello,

A simple question: what is the syntax in a try/except for the OLE error?

Let say you want to catch OLE error:

try: print stuff
except OLEError: print 'ole'

Now the problem is that I just can't seem to find anything how the
exact grammar of this error! I have looked in the Python
documentation, as well as the pywin32 documentation, I have tried many
different ways of typing it, I googled around, but yet I just can't
find it.


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

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

Reply via email to