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

gulpfile: throw right exception #7539

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

Conversation

pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Mar 9, 2025

What this PR does

Throw a PluginError exception
instead of the previous Error
exception.

The previous code had the wrong
number of arguments for the
constructor, so that did not
work as intended.

Also hoist the imports to the top
level, break a long string into
multiple lines, and remove
the showStack argument which
already had the default value for
the past ~10 years.

Test me

Trigger the error and see that the exception is the expected one.

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

pjonsson added 2 commits March 9, 2025 12:24
Hoist the multiple imports of plugin-error
to a single top level import. Also remove
the "showStack: false" configuration to each
call since that has been the default
for ~10 years, break up the long string
to fit in a line, and remove the
questionmark at the end of the error
message.
Throw a PluginError exception
instead of the previous Error
exception.

The previous code had the wrong
number of arguments for the
constructor, so that did not
work as intended.
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