(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/module-mailcap.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/module-xdrlib.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/xdr-unpacker-objects.html| ]]
|
Python Library Reference
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/contents.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/modindex.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/genindex.html| ]]
|
Next: 12.14 mailcap Up: 12.13 xdrlib Previous: 12.13.2 Unpacker Objects
12.13.3 Exceptions
Exceptions in this module are coded as class instances:
- Error
- The base exception class. Error has a single public data member msg containing the description of the error.
- ConversionError
- Class derived from Error. Contains no additional instance variables.
Here is an example of how you would catch one of these exceptions:
import xdrlib
p = xdrlib.Packer()
try:
p.pack_double(8.01)
except xdrlib.ConversionError, instance:
print 'packing the double failed:', instance.msg
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/module-mailcap.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/module-xdrlib.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/xdr-unpacker-objects.html| ]]
|
Python Library Reference
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/contents.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/modindex.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/genindex.html| ]]
|
Next: 12.14 mailcap Up: 12.13 xdrlib Previous: 12.13.2 Unpacker Objects
Send comments on this document to python-docs@python.org.