diff --git a/doc/site/error-handling.markdown b/doc/site/error-handling.markdown index 289096e3..bda60c6d 100644 --- a/doc/site/error-handling.markdown +++ b/doc/site/error-handling.markdown @@ -84,7 +84,7 @@ For example, if you run this program: It prints: :::text - Num does not implement method 'badMethod'. + Caught error: Num does not implement method 'badMethod'. The called fiber can no longer be used, but any other fibers can proceed as usual. When a fiber has been aborted because of a runtime error, you can also get the error from the fiber object. Continuing the above example: @@ -115,4 +115,4 @@ Consider a program that reads in a string of input from the user and parses it t For cases like this where failure can occur and the program *will* want to handle it, fibers and `try` are too coarse-grained to work with. Instead, these operations will indicate failure by *returning* some sort of error indication. -For example, a method for parsing a number could return a number on success and `null` to indicate parsing failed. Since Wren is dynamically typed, it's easy and natural for a method to return different types of values. \ No newline at end of file +For example, a method for parsing a number could return a number on success and `null` to indicate parsing failed. Since Wren is dynamically typed, it's easy and natural for a method to return different types of values.