Giter VIP home page Giter VIP logo

Comments (7)

sindresorhus avatar sindresorhus commented on May 27, 2024 1

@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.

varunsrin avatar varunsrin commented on May 27, 2024

@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.

sindresorhus avatar sindresorhus commented on May 27, 2024

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.

Coding-Kiwi avatar Coding-Kiwi commented on May 27, 2024

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.

varunsrin avatar varunsrin commented on May 27, 2024

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.

varunsrin avatar varunsrin commented on May 27, 2024

@sindresorhus pr is here: #25

from electron-unhandled.

sindresorhus avatar sindresorhus commented on May 27, 2024

If anyone wants to work on this, see the initial attempt in #25.

from electron-unhandled.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.