error-handling: does not show how to deal with errors
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- fsharp, go
- Domain
- documentation
Research direction
Start by locating the error-handling exercise referenced in this issue and compare it with the Go track exercise described as handling resource errors and cleanup. Define the exercise changes needed to make students handle errors returned or raised by called code, including cleanup, then verify the revised exercise and tests cover those scenarios.
Written by the indexing model from the issue text.
Description
TL;DR: I'm missing in this exercise how to handle exceptions thrown (or anay other kind of error bubble) in code called by me and how to properly clean up then.
This exercises shows me how to use failwith, Option<'T> and Result<'TOk, 'Terror> when I want to return it.
It briefly touches how to deal with a Result that is passed in via the bind function, but not how to deal with a result returned from another function I've called.
But so far nothing new. We have already returned Options and Results earlier in the track, so that is nothing new, we did already pattern matching to unwrap our own types, so thats nothing different than the incomming Result in bind…
The only thing that is really new, is that we are asked to dispose some object. But wait, what are objects, how to dispose? What oh, I have to call Dispose() from IDisposable? Whats that? An interface? Aha… Good luck I have heard of thise things in OOP classes already… So just do it…
In my opinion, this exercise would gain a lot, if we actually had to handle real errors instead of just creating them from nothing.
Eg. in the go track, we get some kind of resource which we have to open, close, write to, etc, pp. Depending on the current testcase, it will return an error value or raise a panic, and then the student has to react and close the resource handle, or do a retry, or recover from the panic. Here the student has to actually handle errors that were created elsewhere. Thats an example of the exercise I learnt a lot from…
- Dominant language
- F#
- Stars
- 118
- Forks
- 113
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from exercism/fsharp
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
-
exercism/fsharp#1173 · 1 comment · 2 reactions · 1 assignee ·
Similar issues
-
area:dictation documentation P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
uttrflow/uttrflow-swift#1180 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
falcosecurity/falco-website#1601 ·
-
specification
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
WICG/webmonetization#729 ·