From 3855e4dd7d3fae2df0df501478fa3d11665c0234 Mon Sep 17 00:00:00 2001 From: rixef Date: Sat, 24 Aug 2024 14:33:32 +0200 Subject: [PATCH] Update instructions.md for Lua error handling (#497) * 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. --- exercises/practice/triangle/.docs/instructions.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/exercises/practice/triangle/.docs/instructions.md b/exercises/practice/triangle/.docs/instructions.md index ac390087..338f8f1a 100644 --- a/exercises/practice/triangle/.docs/instructions.md +++ b/exercises/practice/triangle/.docs/instructions.md @@ -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