diff --git a/core/src/main/java/com/google/errorprone/refaster/UTemplater.java b/core/src/main/java/com/google/errorprone/refaster/UTemplater.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/google/errorprone/refaster/UTemplater.java
+++ b/core/src/main/java/com/google/errorprone/refaster/UTemplater.java
@@ -930,7 +930,13 @@ public class UTemplater extends SimpleTreeVisitor<Tree, Void> {
             (Class) annotationClazz,
             AnnotationProxyMaker.generateAnnotation(compound, annotationClazz));
       } catch (ClassNotFoundException e) {
-        throw new IllegalArgumentException("Unrecognized annotation type", e);
+        String friendlyMessage =
+            "Tried to instantiate an instance of the annotation "
+                + annotationClassName
+                + " while processing "
+                + symbol.getSimpleName()
+                + ", but the annotation class file was not present on the classpath.";
+        throw new LinkageError(friendlyMessage, e);
       }
     }
     return builder.build();
Expand on the error when a Refaster template is trying to be loaded, but the annotations required aren't on the classpath.

RELNOTES=n/a
PiperOrigin-RevId: <I>