Web features explorer

Promise.try()

Limited availability
Tags: javascript Groups: JavaScript > Promises

The Promise.try() static method returns a promise that takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result in a Promise. To learn more, see Promise.try() at MDN.

Compatibility

Specifications