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

Catch exceptions when creating traits #1947

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

mtdowling
Copy link
Member

Some traits like the http trait will throw exceptions that are not SourceExceptions. This previously would cause the CLI to stop on the first exception and not show pretty error output. This fixes that by catching RuntimeExceptions to turn them into ValidationEvents.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Some traits like the http trait will throw exceptions that are not
SourceExceptions. This previously would cause the CLI to stop on
the first exception and not show pretty error output. This fixes that
by catching RuntimeExceptions to turn them into ValidationEvents.
@mtdowling mtdowling requested a review from a team as a code owner August 24, 2023 18:25
@mtdowling mtdowling merged commit 0f1c378 into main Aug 24, 2023
11 checks passed
@srchase srchase deleted the catch-exceptions-when-creating-traits branch August 24, 2023 18:51
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.

2 participants