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

ExpressionBuilders should have an asThrow method. #913

Closed
thosakwe opened this issue Feb 23, 2017 · 2 comments · Fixed by dart-archive/code_builder#85
Closed

ExpressionBuilders should have an asThrow method. #913

thosakwe opened this issue Feb 23, 2017 · 2 comments · Fixed by dart-archive/code_builder#85

Comments

@thosakwe
Copy link
Contributor

thosakwe commented Feb 23, 2017

It would be very helpful if we could do something like:

new TypeBuilder('StateError').newInstance(['Blah blah blah']).asThrow();

This would also work, and might be better than the original suggestion I had:

new ThrowExpression(...)

I have a branch where this change is implemented as an asThrow method on ExpressionBuilder instances, but it wouldn't be difficult for me to just expose the _ThrowExpression class I created.

Thoughts on this? Can I go ahead and submit a PR, or was I too vague and need to clarify?

Thanks in advance.

@matanlurey
Copy link
Contributor

Sounds good - send a PR!

@thosakwe
Copy link
Contributor Author

Nice!

@mosuem mosuem transferred this issue from dart-archive/code_builder Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants