Skip to content

Better suggestions for error handling #1414

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion exercises/practice/hamming/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Instructions append

With this exercise, you are introduced to the use of
[multiple results](multiple_returns) feature and here there
is an example with [errors](errors)

func Foo(a, b string) (string, error) {
return "", errors.New("An error occurred!")
}

You may be wondering about the `cases_test.go` file. We explain it in the
[leap exercise][leap-exercise-readme].

[leap-exercise-readme]: https://github.com/exercism/go/blob/master/exercises/leap/README.md
[leap-exercise-readme]: https://github.com/exercism/go/blob/master/exercises/leap/README.md
Comment on lines 11 to +14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, this is probably best explained in the track-specific tests.md file (see the spec), but I feel like it's fine for now.

3 changes: 1 addition & 2 deletions exercises/practice/hamming/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ The Hamming Distance is useful for lots of things in science, not just biology,

The Hamming distance is only defined for sequences of equal length, so
an attempt to calculate it between sequences of different lengths should
not work. The general handling of this situation (e.g., raising an
exception vs returning a special value) may differ between languages.
not work.