Invokes the candidate function and returns fallback if an error is thrown from it.
The candidate function to run.
The fallback value to return if candidate throws an error.
The result from candidate. Returns fallback if candidate throws an Error. If no fallback value is provided, then undefined is returned.
Invokes the candidate function and returns undefined if an error is thrown from it.
The result from candidate. Returns undefined if candidate throws an Error.
The result from candidate. Returns fallback if candidate throws an Error.
Invokes the candidate function and returns fallback if an error is thrown from it.
Param: candidate
The candidate function to run.
Param: fallback
The fallback value to return if candidate throws an error.
Returns
The result from candidate. Returns fallback if candidate throws an Error. If no fallback value is provided, then undefined is returned.