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

Error operator #1428

Open
kirjorjos opened this issue Dec 3, 2024 · 6 comments
Open

Error operator #1428

kirjorjos opened this issue Dec 3, 2024 · 6 comments

Comments

@kirjorjos
Copy link
Contributor

kirjorjos commented Dec 3, 2024

Issue type:

  • ➕ Feature request

Short description:

An operator with the signature String -> Any that if triggered, will throw the given string as a standard error when hovering over the red X in a part trying to use the final card. Example usage would be:

choice(bool, str, error(str)) :: Boolean -> String -- returns the string if bool is true, errors the string if bool is false

adding to Integrated Dynamics, it "would then also work in [Integrated Scripting]"

@rubensworks
Copy link
Member

Thanks for the suggestion!

@github-project-automation github-project-automation bot moved this to Options in Features Dec 3, 2024
@kirjorjos
Copy link
Contributor Author

With this, do we think an Any -> String catch operator might be a good idea? Either returns the error string or some default string, or Any -> String -> String if we don't want to do a default string.

@rubensworks
Copy link
Member

Something like that could be useful indeed!

@kirjorjos
Copy link
Contributor Author

Do you have any preference for if it should have a String input or default string, and if default, what it should be?

@rubensworks
Copy link
Member

Any -> String -> String makes more sense to me atm. But I don't have a strong preference tbh.

@rubensworks
Copy link
Member

rubensworks commented Dec 16, 2024

Operator for throwing a new error added in 5d8864a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Options
Development

No branches or pull requests

2 participants