Comments (2)
Hello, thank you for the fast reply. No, the log option wouldn't work for me; I have already caught the error within a try-catch
block.
However, I decided I don't really need this for now, so don't worry about it :)
from log-process-errors.
Hi @papb 👋
At the moment, the logic related to error formatting is not decoupled from the logic related to error handling, so you would need to handle the errors using log-process-errors
to benefit from the error formatting.
One thing to keep in mind is that the error formatting needs not only the error instance, but also any properties passed to the process
event. For example, in process.on('unhandledPromise', (error, promise) => {...}
, both error
and promise
are printed by the error formatter (since they are both interesting). So if we were to decouple error formatting, users would need to pass those arguments along as well. Although we could make those additional arguments optional (but the output will be less informative).
Decoupling the formatting logic is not completely straightforward though, so I'd like to ask you: would the log
option be a solution for you? This would require you to catch the error using log-process-errors
, but you would still be able to run your custom logic.
from log-process-errors.
Related Issues (11)
- [BUG] Not compatible with Node 6 HOT 1
- Why isn't this in core? HOT 3
- `tape` is loaded even without the `testing: tape` option HOT 10
- Processing version 3.5.4 - A Serious Error Happened During Startup
- Remove (seemingly) unused core-js dependency HOT 4
- 5.1.0 marked as latest in npm HOT 2
- 6.1.0 - Errors when ExperimentalWarning is caught HOT 3
- `Error [ERR_REQUIRE_ESM]: Must use import to load ES Module`
- Why not raise the core console.log problems to node.js? HOT 1
- Casing change in 10.0.0 release notes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log-process-errors.