Skip to content

Commit

Permalink
[POV]: Update instructions.append.md
Browse files Browse the repository at this point in the history
Massaged the phrasing a bit to point students to both raising the specific error type, and including a specific error message.
  • Loading branch information
BethanyG authored Aug 26, 2024
1 parent 7ea631f commit 96ea536
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exercises/practice/pov/.docs/instructions.append.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Sometimes it is necessary to [raise an exception](https://docs.python.org/3/tutorial/errors.html#raising-exceptions). When you do this, you should always include a **meaningful error message** to indicate what the source of the error is. This makes your code more readable and helps significantly with debugging. For situations where you know that the error source will be a certain type, you can choose to raise one of the [built in error types](https://docs.python.org/3/library/exceptions.html#base-classes), but should still include a meaningful message.

This particular exercise requires that you use the [raise statement](https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement) to "throw" multiple `ValueErrors` if the `Tree()` class is passed a tree that cannot be reoriented, or a path cannot be found between a `start node` and an `end node`. The tests will only pass if you both `raise` the `exception` and include a message with it.
This particular exercise requires that you use the [raise statement](https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement) to "throw" multiple `ValueErrors` if the `Tree()` class is passed a tree that cannot be reoriented, or a path cannot be found between a `start node` and an `end node`.
The tests will only pass if you both `raise` the expected `exception` type and include the expected message with it.

Please check the tests and their expected results carefully.

0 comments on commit 96ea536

Please sign in to comment.