Skip to content

Throw ValidityException instead of saving it#83

Merged
hinerm merged 4 commits into
mainfrom
scijava/scijava-ops-api/remove-validity-exception
Aug 8, 2023
Merged

Throw ValidityException instead of saving it#83
hinerm merged 4 commits into
mainfrom
scijava/scijava-ops-api/remove-validity-exception

Conversation

@gselzer

@gselzer gselzer commented Jul 26, 2023

Copy link
Copy Markdown
Member

This PR simplifies the OpInfo API around ValidityExceptions - instead of saving the Exception, the constructor now throws the Exception. Then, during OpInfo construction, we now catch these Exceptions and continue on.

We still have to figure out how to log the Exceptions, so that developers can determine how to make their ops valid - I'm tempted to just wait until #82 is merged, because logging would then be quite easy.

Question for the reviewer: Are failures getting tested? Should we add additional tests? What might those tests look like?

@gselzer gselzer added the bug Something isn't working label Jul 26, 2023
@gselzer gselzer requested a review from hinerm July 26, 2023 22:16
@gselzer gselzer self-assigned this Jul 26, 2023
gselzer added 2 commits August 3, 2023 13:32
Unrelated to the PR, but didn't want to forget this and too small for an
issue
This change also make them RuntimeExceptions
@hinerm hinerm force-pushed the scijava/scijava-ops-api/remove-validity-exception branch from 9aa6ba9 to eef0e77 Compare August 3, 2023 18:34
@hinerm hinerm merged commit 28755f9 into main Aug 8, 2023
@hinerm hinerm deleted the scijava/scijava-ops-api/remove-validity-exception branch August 8, 2023 18:56
@hinerm

hinerm commented Aug 8, 2023

Copy link
Copy Markdown
Member

Are failures getting tested? Should we add additional tests? What might those tests look like?

The failures are not getting tested (per uses of ValidityException.problems()) except in the recent OpMethodDependencyPositionTest.

I think the tests should be looked at with scijava/scijava#105, because ValidityProblems still need some API work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants