Detalhes do pacote

apr-main

ramitos88MIT4.0.3

Catches a promise error, writes the stacktrace to stderr and exists

main, run, first, async

readme (leia-me)

main

Catches a promise error, writes the stacktrace to stderr and exists

Parameters

Examples

import main from 'apr-main';

main(async () => 'hello') // writes nothing
main(async () => undefined) // writes nothing
main(async () => { throw new Error('uncaught error') }) // writes the stack trace to stderr and exists

Returns Promise