UnhandledRejectionTracker

Remembers promises that were rejected with nothing to catch them. One of these belongs to each Context.

Nothing happens by default, because there is no one right answer: an embedder decides whether an unhandled rejection should log, throw or be ignored. Turning tracking on with Context.trackUnhandledPromiseRejections starts collecting them here, and it is then the embedder's job to drain them, or they simply pile up.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun enumerate(): List<Any?>

The rejections so far, left in place. process is what clears them.

Link copied to clipboard
fun process(handler: (Any?) -> Unit)

Hands every rejection so far to handler and forgets it, so each one is reported once.