X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?a=blobdiff_plain;f=coroutines_and_aborts.mdwn;h=328307959fed1565e147a294bb1915f8314a3850;hb=d04d6d0d9fd3df615aef2b008f7f7c79afa55e54;hp=6cc40f0a6741a21789b7562dee05fdc1cff88365;hpb=7cfdfaa19f5612e559e57da87acc0edf19aac1f3;p=lambda.git diff --git a/coroutines_and_aborts.mdwn b/coroutines_and_aborts.mdwn index 6cc40f0a..32830795 100644 --- a/coroutines_and_aborts.mdwn +++ b/coroutines_and_aborts.mdwn @@ -358,7 +358,7 @@ How about this: Remind you of anything we discussed earlier? /Trivia. -Of course, it's possible to handle errors in other ways too. There's no reason why the implementation of `List.nth` *had* to do things this way. They might instead have returned `Some a` when the list had an nth member `a`, and `None` when it does not. But it's pedagogically useful for us to think about this pattern now. +Of course, it's possible to handle errors in other ways too. There's no reason why the implementation of `List.nth` *had* to raise an exception. They might instead have returned `Some a` when the list had an nth member `a`, and `None` when it does not. But it's pedagogically useful for us to think about the exception-raising pattern now. When an exception is raised, it percolates up through the code that called it, until it finds a surrounding `try ... with ...` that matches it. That might not be the first `try ... with ...` that it encounters. For example: