Wraps a synchronous function with error handling and logging.
Catches errors thrown by the function, logs them via log using the
function's name, and returns undefined instead of propagating the error.
The tuple type of function arguments
The return type of the function
Wrapped function that returns the original result or undefined on error
Wraps an asynchronous function with error handling and logging.
Catches errors thrown or rejected by the function, logs them via log using the function's name, and returns
undefinedinstead of propagating the error.