-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
testingTDD all day everydayTDD all day everyday
Description
- improved error handling by adding custom exceptions class for bauhaus (bauhaus/errors.py)
- removes current use of long strings in classes
- adds more informative naming of errors instead of the generic ValueError, etc
- we will be able to catch errors we expect and allow unexpected ones to bubble up during testing and from use
- errors always follow this pattern: (francois chollet, user experience design for APIs)
1. Catch user errors early and anticipate common mistakes.
Do user input validation as soon as possible. Actively keep track of common mistakes that people make, and either solve them by simplifying your API, adding targeted error messages for these mistakes, or having a "solutions to common issues" page in your docs.
2. Provide detailed feedback messages upon user error.
A good error message should answer: what happened, in what context? What did the software expect? How can the user fix it? They should be contextual, informative, and actionable. Every error message that transparently provides the user with the solution to their problem means one less support ticket, multiplied by how many times users run into the same issue.
haz
Metadata
Metadata
Assignees
Labels
testingTDD all day everydayTDD all day everyday