Run the supplied arity-zero function, and if it throws an error, return the
caughtValue instead (or undefined if not provided).
This is only safe to do when we know that nothing at any point in the call
stack relies on the Error.stack property, and only worth doing in hot
paths where a function is expected to throw often (for example, calling
statSync on many paths to find the first one that exists).
Run the supplied arity-zero function, and if it throws an error, return the
caughtValueinstead (orundefinedif not provided).This is only safe to do when we know that nothing at any point in the call stack relies on the
Error.stackproperty, and only worth doing in hot paths where a function is expected to throw often (for example, callingstatSyncon many paths to find the first one that exists).