A variant of
catch that catches both synchronous and
asynchronous exceptions.
WARNING: This function (and other
*SyncOrAsync functions) is
for advanced users. Most of the time, you probably want to use the
non-
SyncOrAsync versions.
Before attempting to use this function, be familiar with the "Rules
for async safe handling" section in
this blog post.