The lambda to wrap
A lambda that will plumb errors to the callback
Like [Trap], but this will plumb errors as Results instead.
This is useful if you want to share the Error as a meaningful result (for instance, cell-level errors in queries).
Any errors are asserted as Errors- that is, if the value in a catch or error callback isn't an instance of an error, it will be wrapped in one. This may lead to misleading stack traces, though. It's always better to use real Errors instead of throw-by-value.
The lambda to wrap
A wrapped lambda that will never throw or use the error callback
Generated using TypeDoc
Given a callback lambda, returns the same lambda wrapped in a Try/Catch.
The Try/Catch can help with catching synchronous errors, which would otherwise be uncaught by the framework.
T The return type of the callback