Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/stdnum/exceptions.py
Commit message (Collapse)AuthorAgeFilesLines
* Make all exceptions inherit from ValueErrorArthur de Jong2022-11-121-2/+2
| | | | | All the validation exceptions (subclasses of ValidationError) are raised when a number is provided with an inappropriate value.
* Explicilty define exported exceptionsDimitri Papadopoulos2021-08-101-0/+4
| | | | | | LGTM alert: Import pollutes the enclosing namespace See: https://lgtm.com/rules/3980091/ Closes https://github.com/arthurdejong/python-stdnum/pull/270
* Ignore N818 because our exceptions are not named errorArthur de Jong2021-07-181-4/+4
|
* Update the flake8 ignore listArthur de Jong2018-02-141-0/+1
| | | | | | | | | | | | Re-enable the flake8 test for unused imports by explicitly marking imports for namespace purposes. This allows us to remove a few unused imports. A few more cleanups that allow us to reduce the number of ignored flake8 ignored tests. The remaining ignored tests are now documented. Ignore a flake8 warning about print statements because we use print in the update scripts.
* Properly print error message of exceptionsArthur de Jong2016-08-281-1/+1
| | | | | This ensures that the message passed to the constructor is shown in the traceback while falling back to the class default.
* Provide a module with validation exceptionsArthur de Jong2013-06-081-0/+66
This introduces a new module for switching the validation scheme. Instead of using the is_valid() function that returns a boolean a validate() function either returns the sanitised number or raises an exception that should indicate the kind of validation failure. This should make it easier for applications calling this library to present more informative messages to the user.