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

[VM/values/custom/vregex] show error if RegEx creation fails #1741

Open
github-actions bot opened this issue Sep 26, 2024 · 0 comments
Open

[VM/values/custom/vregex] show error if RegEx creation fails #1741

github-actions bot opened this issue Sep 26, 2024 · 0 comments
Labels
error handling Issues related to Error handling :regex todo Automatically generated issues from TODOs in the code values Issues related to the core Value type

Comments

@github-actions
Copy link

right now, if there is an error in the regex, the program

just crashes

For example:

```

to :regex "\w: (?\d+), \w: (?\d+)"

```

# TODO(VM/values/custom/vregex) show error if RegEx creation fails


    else:
        rx.pattern

# TODO(VM/values/custom/vregex) show error if RegEx creation fails
#  right now, if there is an error in the regex, the program
#  just crashes
#
#  For example:
#   ```
#   to :regex "\w: (?\d+), \w: (?\d+)"
#   ```
#  labels: values, :regex, error handling

proc newRegexObj*(pattern: string, flags: string = ""): VRegex =
    when defined(WEB):
        if flags == "":

@github-actions github-actions bot added :regex error handling Issues related to Error handling todo Automatically generated issues from TODOs in the code values Issues related to the core Value type labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling Issues related to Error handling :regex todo Automatically generated issues from TODOs in the code values Issues related to the core Value type
Projects
None yet
Development

No branches or pull requests

0 participants