Skip to content

Commit 57f11c2

Browse files
authored
[POV]: Update instructions.append.md (#3761)
Massaged the phrasing a bit to point students to both raising the specific error type, and including a specific error message.
1 parent 7ea631f commit 57f11c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exercises/practice/pov/.docs/instructions.append.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
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.
66

7-
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.
7+
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`.
8+
The tests will only pass if you both `raise` the expected `exception` type and include the expected message with it.
89

910
Please check the tests and their expected results carefully.

0 commit comments

Comments
 (0)