mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Derive exception classes from Exception
This commit is contained in:
parent
27a353020b
commit
f74e46cf47
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue