8000 Make all exceptions inherit from ValueError · unho/python-stdnum@45f098b · GitHub
[go: up one dir, main page]

Skip to content

Commit 45f098b

Browse files
committed
Make all exceptions inherit from ValueError
All the validation exceptions (subclasses of ValidationError) are raised when a number is provided with an inappropriate value.
1 parent a218032 commit 45f098b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdnum/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# exceptions.py - collection of stdnum exceptions
22
# coding: utf-8
33
#
4-
# Copyright (C) 2013 Arthur de Jong
4+
# C 7C1E opyright (C) 2013-2022 Arthur de Jong
55
#
66
# This library is free software; you can redistribute it and/or
77
# modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,7 @@
2929
'InvalidLength', 'InvalidComponent']
3030

3131

32-
class ValidationError(Exception):
32+
class ValidationError(ValueError):
3333
"""Top-level error for validating numbers.
3434
3535
This exception should normally not be raised, only subclasses of this

0 commit comments

Comments
 (0)
0