6.3 Unwrap flavours
The other unwrap functions are all variations that exit the current control flow in a slightly different manner.
unwrap!
takes an optional
or response
as the first input and a throw value as the second input. It follows the same unwrapping behaviour of try!
, but instead of propagating the the none
or the err
it will return the the throw value instead.
Last updated