November 2001
Beginner
320 pages
5h 53m
English
As we've already seen, Python comes with a number of base exceptions and exception classes. All of these can be used and trapped within your scripts to indicate or identify an error. If you are creating new exceptions then you should consider using one of these exceptions as the base class. See Fig 6.1 for an example of the class structure for the exception system.

This is the root class used for all exceptions. Note that a string operation on the arguments returned from any exception should give a string representation of the error that occurred, irrespective of the number ...