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

refactor: Errors do not need "new" #2445

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

erights
Copy link
Contributor

@erights erights commented Sep 4, 2024

Closes: #XXXX
Refs: Agoric/agoric-sdk#10030

Description

Errors do not need new

For all construction calls to a *Error constructor, the new is not needed. IOW, just calling the *Error constructor as a function has the same effect.

Security Considerations

none

Scaling Considerations

none

Documentation Considerations

none

Testing Considerations

none

Compatibility Considerations

none

Upgrade Considerations

none

@erights erights self-assigned this Sep 4, 2024
@erights erights marked this pull request as ready for review September 4, 2024 20:27
@erights erights requested a review from turadg September 5, 2024 04:57
mergify bot pushed a commit to Agoric/agoric-sdk that referenced this pull request Sep 5, 2024
Closes: #XXXX
Refs: endojs/endo#2445

## Description

Errors do not need `new`

For all construction calls to a `*Error` constructor, the `new` is not needed. IOW, just calling the `*Error` constructor as a function has the same effect.

### Security Considerations

none
### Scaling Considerations

none
### Documentation Considerations

none
### Testing Considerations

none
### Compatibility Considerations

none
### Upgrade Considerations

none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant