Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ignoreErrors to accept regular expressions #90

Closed
jeremyhaile opened this issue Mar 20, 2013 · 9 comments
Closed

Change ignoreErrors to accept regular expressions #90

jeremyhaile opened this issue Mar 20, 2013 · 9 comments

Comments

@jeremyhaile
Copy link

Currently - ignoreUrls accepts an array of regular expressions and ignoreErrors accepts an array of strings. Instead, each of these should accept an array of strings or regular expressions so that more flexible matching could be done. (or just regular expressions)

To give a specific example of when this is needed, I'm receiving errors such as "Uncaught Error: Error connecting to extension gclcmokkcfnjpghegbnebiokigholeli" I would like to ignore errors using a regex like /Error connecting to extension/ since those errors have nothing to do with my web application.

@acdha
Copy link
Contributor

acdha commented Mar 20, 2013

This was mentioned as an aside in #73. I'm 👍 on including it since it should be easy just to do a type-check on each entry in both arrays.

@jeremyhaile
Copy link
Author

Exactly - we had agreed on it in #73 - but wanted to open a specific issue for tracking it, since it's a new enhancement.

@terinjokes
Copy link

Is there any work on this? I don't want to double efforts if someone else is already working on it.

@jeremyhaile
Copy link
Author

@terinjokes did you do any work on this? branch? Can't wait to roll this out.

@mattrobenolt
Copy link
Contributor

The only reason I haven't done this is because we either need to just assume all regex all the time, or type check. I dislike the idea of type checking, but now we've broken the API.

I like promoting just using all regex, and maybe this is an ok change for 1.1.

Does that sound reasonable?

@acdha
Copy link
Contributor

acdha commented Apr 10, 2013

Why is type checking such a bad idea? I wouldn't want to get carried away
with it but a simple if (foo.test) { … regexp … } else { … string … }
seems unlikely to cause much confusion.

@terinjokes
Copy link

I did some work for this, but haven't pushed to a GitHub branch yet. I'll push today.

@jeremyhaile
Copy link
Author

@terinjokes great - thanks!

@jeremyhaile
Copy link
Author

@terinjokes any update on that branch? and a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants