Updated on-error example.
h3rald h3rald@h3rald.com
Mon, 09 Feb 2026 13:19:28 +0100
2 files changed,
5 insertions(+),
4 deletions(-)
M
examples/on-error.xyw
→
examples/on-error.xyw
@@ -15,13 +15,14 @@ $00 system.error STB
RTS .label on_error.div-by-zero.print div-by-zero-error puts JSRw - $03 system.error STB + $00 system.error STB RTS .include "lib/puts.xyw" .label div-by-zero-error -.string "Error: Division by zero.\n" + .string "Error: Division by zero.\n" .label unknown-error -.string "Error: Unknown error.\n" + .string "Error: Unknown error.\n" + .label end
M
test.sh
→
test.sh
@@ -5,7 +5,7 @@ ### Test cases
TEST_CASES=( "run_test helloworld.xyw assert_output_equals \$'Hello, World!\\n'" "run_test d6.xyw assert_output_in_range 1 6" - "run_test on-error.xyw assert_output_equals \$'Error: Division by zero.\\nError: Unknown error.\\n'" + "run_test on-error.xyw assert_output_equals \$'Error: Division by zero.\\n'" "run_test print-args.xyw test1 test2 -- assert_output_equals \$'print-args.xim, test1, test2\\n'" "run_test factorial8.xyw assert_output_equals \$'120\\n'" "run_test factorial16.xyw assert_output_equals \$'5040\\n'"