s/try/catch

This commit is contained in:
Niko Matsakis 2016-02-05 17:59:03 -05:00
parent 00e839fe4d
commit d9e79e4c57
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ behavior of exception-handling code.
Note that `catch { foo()? }` is essentially equivalent to `foo()`.
`catch` can be useful if you want to coalesce *multiple* potential
exceptions -- `try { foo()?.bar()?.baz()? }` -- into a single
exceptions -- `catch { foo()?.bar()?.baz()? }` -- into a single
`Result`, which you wish to then e.g. pass on as-is to another
function, rather than analyze yourself. (The last example could also
be expressed using a series of `and_then` calls.)