Sorted exceptions; added ImportError.

This commit is contained in:
Guido van Rossum 1991-12-24 13:24:53 +00:00
parent 1c8230b70d
commit ed7711b7cb
1 changed files with 12 additions and 10 deletions

View File

@ -605,6 +605,7 @@ getbuiltin(name)
object *AttributeError;
object *EOFError;
object *IOError;
object *ImportError;
object *IndexError;
object *KeyError;
object *KeyboardInterrupt;
@ -631,21 +632,22 @@ newstdexception(name)
static void
initerrors()
{
RuntimeError = newstdexception("RuntimeError");
AttributeError = newstdexception("AttributeError");
EOFError = newstdexception("EOFError");
TypeError = newstdexception("TypeError");
IOError = newstdexception("IOError");
ImportError = newstdexception("ImportError");
IndexError = newstdexception("IndexError");
KeyError = newstdexception("KeyError");
KeyboardInterrupt = newstdexception("KeyboardInterrupt");
MemoryError = newstdexception("MemoryError");
NameError = newstdexception("NameError");
SystemError = newstdexception("SystemError");
KeyboardInterrupt = newstdexception("KeyboardInterrupt");
AttributeError = newstdexception("AttributeError");
IOError = newstdexception("IOError");
ZeroDivisionError = newstdexception("ZeroDivisionError");
IndexError = newstdexception("IndexError");
ValueError = newstdexception("ValueError");
KeyError = newstdexception("KeyError");
OverflowError = newstdexception("OverflowError");
RuntimeError = newstdexception("RuntimeError");
SyntaxError = newstdexception("SyntaxError");
SystemError = newstdexception("SystemError");
TypeError = newstdexception("TypeError");
ValueError = newstdexception("ValueError");
ZeroDivisionError = newstdexception("ZeroDivisionError");
}
void