add error-handling exercise
Implemented the Error Handling practice exercise with solution, tests, and documentation
Hello. Thanks for opening a PR on Exercism 🙂
We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.
You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.
If you're interested in learning more about this auto-responder, please read this blog post.
Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.
/format
The "Format code" action has started running.
The "Format code" action has finished running.
For security reasons, /format does not trigger CI builds when the PR has been submitted from a fork. If checks were not passing due to code format, trigger a build to make the required checks pass, through one of the following ways:
- Push an empty commit to this branch:
git commit --allow-empty -m "Trigger builds". - Close and reopen the PR.
- Push a regular commit to this branch.
Hi @SleeplessByte thanks for your review, sorry it took this long for me to reply, just to clarify, when you say "The only issue I have is that this isn't actually handling any error!" do you mean that the function should include descriptive error messages rather than handling more complex error scenarios?
@A-O-Emmanuel no worries! We are not in a hurry.
Right now, the exercise wants you to throw errors. It doesn't want you to handle the error.
Handling errors could be:
try { } catch { }
or
promise.catch(...)
or
try { } finally { }
or
promise.finally(...)
Oh, that's true, I'll just have to revert back to the way I did it before. Thanks for the clarification, I've learnt something today, "throwing errors and handling errors" are two different things, yeah, it makes sense, thank you.
@Cool-Katt how do you feel about this?
I was kinda out of the loop on this one so I can review in more depth tomorrow, but preliminary assessment is that I would have liked to see a couple of more tests.
I'll probably have to get up to speed first tho, to comment more
Hi @Cool-Katt, okay I will add more tests, but I'll wait for your final assessment before adding more tests.
Right, sorry folks, real life got in the way. Anyway.
The way I see it, currently its a good effort but i'd maybe like to see some more restrictions/explicit handling scenarios. It also definitely needs more tests and maybe a rewrite of the instructions.
Okay @Cool-Katt, thanks, just got the chance to look at your comments, been really occupied, but I should be free ending of next week to start implementing your suggestions, thank you.
hi @Cool-Katt I've made changes and added more tests, please review, and sorry for the delay.