Skip to content

Commit 4ec6568

Browse files
Treiblesschorlegselzer
authored andcommitted
Throw IAE if there is a problem with secondary args given by a user
1 parent f68064a commit 4ec6568

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/scijava/ops/matcher/OpCandidate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ public Object createOp(Object... secondaryArgs) throws OpMatchingException {
212212
return createOpInstance(secondaryArgs).object();
213213
}
214214

215-
private void inject(StructInstance<?> opInst, Object... secondaryArgs) throws OpMatchingException {
215+
private void inject(StructInstance<?> opInst, Object... secondaryArgs) {
216216
// Inject the secondary args if there are any
217217
if (Inject.Structs.isInjectable(opInst)) {
218218
// Get padded secondary args
219219
Object[] paddedArgs = OpUtils.padArgs(this, true, secondaryArgs);
220220
if (paddedArgs == null) {
221-
throw new OpMatchingException(opInfo().implementationName() + " | " + getStatus());
221+
throw new IllegalArgumentException(opInfo().implementationName() + " | " + getStatus());
222222
}
223223
Inject.Structs.inputs(opInst, paddedArgs);
224224
// Secondary args are given, however there are no to inject

0 commit comments

Comments
 (0)