1. apr-main
Catches a promise error, writes the stacktrace to stderr and exists
apr-main
Package: apr-main
Created by: ramitos
Last modified: Mon, 13 Jun 2022 03:19:55 GMT
Version: 4.0.3
License: MIT
Downloads: 105
Repository: https://github.com/ramitos/apr

Install

npm install apr-main
yarn add apr-main

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

Dependencies

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code