Comments (7)
@Coding-Kiwi Yes, it usually would have been faster for me to implement stuff myself, but, not everything is worth implementing. Whether someone is willing to do a pull request for a feature is a good indication of whether such feature is worth adding. Also, discussing the optimal solution is valuable. I often don't think of the best solution myself as I don't know all the requirements. I do implement important things myself when I have the time.
For example, in this situation. I have no need for this feature, but I'm willing to have it added if someone cares enough to do a good pull request.
from electron-unhandled.
@sindresorhus interested in working on this if you are open to it.
General idea is:
- Add
filter
param to option, which should be a valid regex (defaults to undefined) - If filter !== undefined, the handleError method runs the regex over error.message
- If it matches, handeError returns immediately, avoiding any logging or dialog displays
Anything I'm missing or additional features that you think are important? That seems similar to what was done here, so I wanted to double check that I'm not repeating a mistake.
from electron-unhandled.
Add filter param to option, which should be a valid regex (defaults to undefined)
I think it should accept a RegExp or a function. If a function, the function would receive the error and return true/false for whether to keep it.
from electron-unhandled.
I will never understand how opensource / pull requests is a thing that works. The time you guys spend on discussing this stupid little issue, the time you spend reviewing, rejecting and commenting the pull requests.. in all those hours and days spend, couldn't you just have implemented it yourself?
from electron-unhandled.
accepting a function makes sense, good suggestion. i now wonder if we should make it only a function to keep the interface simple. caller can wrap the regex into a function if they want to.
i will start working on it, and you can comment in the PR if you agree. easy modification either way.
from electron-unhandled.
@sindresorhus pr is here: #25
from electron-unhandled.
If anyone wants to work on this, see the initial attempt in #25.
from electron-unhandled.
Related Issues (15)
- Register it automatically on new browser windows
- Dialog message prefix HOT 3
- Duplicate dialogs and application still crashes HOT 1
- Unhandled Errors Message Information HOT 4
- Copy to clipboard HOT 2
- Plans to remove use of the remote module? HOT 11
- How is this different from handling the errors manually? HOT 1
- Serialized error return Buffer and it is unreadable. HOT 3
- Does not work without webpack polyfills in renderer mode HOT 2
- Allow localisation of the library HOT 1
- Hide stack trace from logError HOT 1
- Report about crashed and unresponsive page
- Only show the error dialog in production by default?
- process.on('uncaughtException') also needs hooking in the renderer 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 electron-unhandled.