Skip to content

Commit

Permalink
Make all exceptions inherit from ValueError
Browse files Browse the repository at this point in the history
All the validation exceptions (subclasses of ValidationError) are raised
when a number is provided with an inappropriate value.
  • Loading branch information
arthurdejong committed Nov 12, 2022
1 parent a218032 commit 45f098b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdnum/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# exceptions.py - collection of stdnum exceptions
# coding: utf-8
#
# Copyright (C) 2013 Arthur de Jong
# Copyright (C) 2013-2022 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -29,7 +29,7 @@
'InvalidLength', 'InvalidComponent']


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

0 comments on commit 45f098b

Please sign in to comment.