Skip to content

Commit 3bb6581

Browse files
prdoyleCopilot
andcommitted
Tweak exception
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f9ce039 commit 3bb6581

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bosk-core/src/main/java/works/bosk/util/ReflectionHelpers.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.objectweb.asm.MethodVisitor;
1414
import org.objectweb.asm.Opcodes;
1515
import org.objectweb.asm.Type;
16-
import works.bosk.exceptions.NotYetImplementedException;
1716

1817
import static java.util.Objects.requireNonNull;
1918
import static org.objectweb.asm.ClassReader.SKIP_CODE;
@@ -75,7 +74,7 @@ public MethodVisitor visitMethod(int access, String name, String descriptor, Str
7574
Method method = lookup.revealDirect(mh).reflectAs(Method.class, lookup);
7675
result.add(method);
7776
} catch (NoSuchMethodException e) {
78-
throw new NotYetImplementedException("Class does not have a method found in the bytecode!", e);
77+
throw new IllegalStateException("Method found in bytecode cannot be retrieved via reflection", e);
7978
} catch (IllegalAccessException e) {
8079
throw new IllegalArgumentException("Unable to access method", e);
8180
}

0 commit comments

Comments
 (0)