A module for generating decent error messages
Installation
yarn add errmsgs
Usage
To initialize the module, use
const errMsgGen = new ;
Getting an error message
Synchronously
errMsgGen;
Asynchronously
const err = await errMsgGen;
Basic Example
// Load the moduleconst errMsgGen = new ; // Make the code asyncasync { // Generate the Error Message const err = await errMsgGen; // Output the error console; // Exit process;};
Sample Output
// This program is error free! Which is why this is a bug report created by an error from this program! Sorry, but the application has crashed! Module Information: Name: errmsgs Version: 1.0.3 Author: 0J3 <ErrMsgs@wafflepowered.com> (https://twitter.com/0j3_3) Loaded Modules: - ./index.js - ./package.json - balanced-match - brace-expansion - concat-map - debug - esprima - folder-hash - get-caller-file - graceful-fs - indent-string - js-yaml - minimatch - ms Folder Hash: kood8Hwn054zIRrfYLpF8NTXQnY= Error: This is some demo output!Call Stack: at C:\Users\Lannan\ErrMsgs\index.js:86:22 at processTicksAndRejections (internal/process/task_queues.js:97:5)
oh by the way, that text after the //
at the top, is randomly selected from a list of possible messages
Notes
I would've made it synchronous if i could, but i sadly couldn't.