mirror of
https://github.com/python/cpython.git
synced 2024-11-23 09:54:58 +08:00
Derive exception classes from Exception
This commit is contained in:
parent
27a353020b
commit
f74e46cf47
@ -47,7 +47,7 @@ def main():
|
||||
for arg in args:
|
||||
check(arg)
|
||||
|
||||
class NannyNag:
|
||||
class NannyNag(Exception):
|
||||
def __init__(self, lineno, msg, line):
|
||||
self.lineno, self.msg, self.line = lineno, msg, line
|
||||
def get_lineno(self):
|
||||
|
@ -13,7 +13,7 @@ except ImportError:
|
||||
__all__ = ["Error", "Packer", "Unpacker", "ConversionError"]
|
||||
|
||||
# exceptions
|
||||
class Error:
|
||||
class Error(Exception):
|
||||
"""Exception class for this module. Use:
|
||||
|
||||
except xdrlib.Error, var:
|
||||
|
Loading…
Reference in New Issue
Block a user