-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
There are several places in the codebase where either an error is printed to the screen using print, 0.0 is returned, or sys.exit() is called. Instead, in all of these cases, an exception should be raised instead with an appropriate message. This will print the entire stack trace to STDERR and is, in general, the Pythonic way of telling the user something has gone wrong.
If there is a situation where you want to tell the user something may have gone wrong, but don't want everything to necessarily blow up in their face, raising a warning is probably the best option.
In Python, you can even define your own custom exceptions (as an example) to raise even more informative errors.
Metadata
Metadata
Assignees
Labels
No labels