hphp/hack/manual/apis/Interfaces/HH.Asio/ResultOrExceptionWrapper/index.md
:::info[Note] This is a point-in-time snapshot of the API documentation from January 2026. Going forward, we will not be maintaining a public copy of these references, and recommend users to refer to the built-in signature helpers available in the Hack LSP instead for complete and up-to-date information. :::
Represents a result of operation that either has a successful result of an
Awaitable or the exception object if that Awaitable failed
This is an interface. You get generally ResultOrExceptionWrapper by calling
wrap(), passing in the Awaitable, and a WrappedResult or
WrappedException is returned.
namespace HH\Asio;
interface ResultOrExceptionWrapper {...}
->getException(): \Exception->getResult(): T->isFailed(): boolAwaitable associated with this wrapper exited
abnormally via an exception of somoe sort->isSucceeded(): boolAwaitable associated with this wrapper exited
normally