error-haiku
v1.0.1
Published
A stress-relieving error handler that prints a calming Haiku before your Node.js app crashes.
Maintainers
Readme
Developers hate seeing massive, angry red error logs. What if your errors were poetic?
error-haiku intercepts unhandled crashes and common errors in your Node.js application. Instead of just spitting out a scary stack trace, it prints a calming, beautifully formatted Haiku about what went wrong to help reduce developer stress.
📦 Installation
Install the package via npm:
npm install error-haiku🚀 Quick Start
Simply require and initialize the package at the very top of your application's entry file (e.g., index.js or server.js). It requires zero configuration.
// Add this at the very top of your app!
const errorHaiku = require('error-haiku');
errorHaiku.init();
// The rest of your code below...
console.log("App started...");🎭 What it looks like
Now, whenever an unhandled exception or rejection occurs, you will be greeted with a beautiful poem before the stack trace.
For example, if you try to call a function that doesn't exist, your terminal will output:
🌸 Function is missing 🌸
🍃 Undefined breaks the whole app 🍃
🍂 Check your recent code 🍂
TypeError: thisIsUndefined is not a function
at Timeout._onTimeout (/your/app/test.js:12:3)📚 Supported Error Poetry
Currently, error-haiku is a trained poet in the following error types:
TypeErrorReferenceErrorSyntaxErrorRangeErrorGeneric(A catch-all for unknown crashes)
