Skip to content

Commit

Permalink
Update instructions.md for Lua error handling (#497)
Browse files Browse the repository at this point in the history
* Update instructions.md for Lua error handling

The instructions did not mention that the use of the error keyword is required. In addition, following the Concepts up to this exercise did not mention the error keyword, as such additional instructions have been added.

* Update instructions.md with assertion

Added an alternative way of using assertion.
  • Loading branch information
RitchieFlick authored Aug 24, 2024
1 parent 09d8496 commit 3855e4d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions exercises/practice/triangle/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,13 @@ a + c ≥ b

See [Triangle Inequality][triangle-inequality]

### Error handling & Assertion

Use error handling or assertion to check if the shape is a triangle at all:

- [Error Keyword][error-keyword]
- [Assertion][assertion]

[triangle-inequality]: https://en.wikipedia.org/wiki/Triangle_inequality
[error-keyword]: https://www.lua.org/manual/5.4/manual.html#pdf-error
[assertion]: https://www.lua.org/manual/5.4/manual.html#pdf-assert

0 comments on commit 3855e4d

Please sign in to comment.