Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCatch runtime error when creating a Regex from an invalid expression #713
Conversation
aische
added some commits
Sep 16, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Sep 16, 2016
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Sep 16, 2016
|
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Sep 16, 2016
Contributor
This is kind of a duplicate of https://github.com/elm-lang/core/pull/380. I suggest closing it, and continuing discussion there (if need for discussion, rather than decision, exists).
|
This is kind of a duplicate of https://github.com/elm-lang/core/pull/380. I suggest closing it, and continuing discussion there (if need for discussion, rather than decision, exists). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
aische
commented
Sep 16, 2016
|
Ah I did not see that. Sorry for duplication and the noise! |
aische commentedSep 16, 2016
Giving an invalid regex string to the function 'regex' crashes Elm. This is bad if you want to create a regex from user input. A function safeRegex could be added that tries to create the regex, and returns 'Just Regex' if it succeeds, or Nothing in case of an error.