{"record":{"id":"c2933e796cf071da","repo":"oracle/graal","slug":"annotation-exception-proxy-did-not-throw-for-s","errorCode":null,"errorMessage":"Annotation exception proxy did not throw for %s","messagePattern":"Annotation exception proxy did not throw for (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler.vmaccess/src/jdk/graal/compiler/vmaccess/HostAnnotationValueConverter.java","lineNumber":361,"sourceCode":"            }\n            return List.copyOf(elements);\n        }\n        return value;\n    }\n\n    /**\n     * Invokes a member known to contain an opaque JDK exception proxy so the public annotation API\n     * exposes the deferred failure details.\n     */\n    private static Object invokeFailingAnnotationMember(Annotation annotation, Method member, Function<Class<?>, ResolvedJavaType> classToType) {\n        try {\n            Proxy.getInvocationHandler(annotation).invoke(annotation, member, null);\n        } catch (EnumConstantNotPresentException | AnnotationTypeMismatchException failure) {\n            return annotationFailureAsAnnotationValueElement(member, failure, classToType);\n        } catch (Throwable failure) {\n            throw sneakyThrow(failure);\n        }\n        throw new IllegalArgumentException(\"Annotation exception proxy did not throw for \" + member);\n    }\n\n    /**\n     * Rethrows {@code failure} without changing its type.\n     */\n    @SuppressWarnings(\"unchecked\")\n    private static <T extends Throwable> RuntimeException sneakyThrow(Throwable failure) throws T {\n        throw (T) failure;\n    }\n}\n","sourceCodeStart":343,"sourceCodeEnd":372,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler.vmaccess/src/jdk/graal/compiler/vmaccess/HostAnnotationValueConverter.java#L343-L372","documentation":"Error \"Annotation exception proxy did not throw for %s\" thrown in oracle/graal.","triggerScenarios":"Thrown at compiler/src/jdk.graal.compiler.vmaccess/src/jdk/graal/compiler/vmaccess/HostAnnotationValueConverter.java:361 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Annotation exception proxy did not throw for {}","solutions":["Fix the condition reported by the error: Annotation exception proxy did not throw for {}","Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call."],"exampleFix":"Validate inputs and environment so that the failing condition does not occur: Annotation exception proxy did not throw for {}","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}