Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ExpressionBuilders should have an asThrow method. #913

@thosakwe

Description

@thosakwe

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions