Skip to content

Catch exceptions when creating traits#1947

Merged
mtdowling merged 1 commit intomainfrom
catch-exceptions-when-creating-traits
Aug 24, 2023
Merged

Catch exceptions when creating traits#1947
mtdowling merged 1 commit intomainfrom
catch-exceptions-when-creating-traits

Conversation

@mtdowling
Copy link
Copy Markdown
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
@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