Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce error handling and try/catch (probably in Data Groups?) #1123

Open
illicitonion opened this issue Oct 24, 2024 · 0 comments
Open
Labels
ITP Work belongs to or is needed for ITP

Comments

@illicitonion
Copy link
Member

ITP currently doesn't introduce error handling. Both conceptually ("Think about something may go wrong, and do something about it") and practically ("try/catch/exceptions/throw").

This was originally a prereq of the Piscine. We'll skip over it for the first Piscine, but we'd like to re-add this as a prereq.

The "thinking about errors" piece is realistically more important than the practicality of try/catch etc. We want to be training people to be thinking about what can go wrong.

One flaw of how we've taught this in the past we'd like to avoid doing again is teaching catch (err) { console.error(err); } as a default action. I'd really like us to emphasise that if something goes wrong, either our code needs to work around it (e.g. with a retry), or we need to display something to the user. In the past a lot of our trainees have thought console.error is a valid way of telling a user something went wrong.

Data Groups probably has some spare time to throw in this extra topic, but open to discussion!

@illicitonion illicitonion added the ITP Work belongs to or is needed for ITP label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ITP Work belongs to or is needed for ITP
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant