@@ -335,7 +335,8 @@ public void registerVerbMethod(MethodInfo method, String className,
335
335
} catch (Exception e ) {
336
336
log .errorf (e , "Failed to process FTL method %s.%s" , method .declaringClass ().name (), method .name ());
337
337
validationFailures .add (new ValidationFailure (toError (methodPos ),
338
- "Failed to process FTL method " + method .declaringClass ().name () + "." + method .name ()));
338
+ "Failed to process FTL method " + method .declaringClass ().name () + "." + method .name () + " "
339
+ + e .getMessage ()));
339
340
}
340
341
}
341
342
@@ -415,7 +416,8 @@ public void registerSQLQueryMethod(MethodInfo method, String className, String r
415
416
} catch (ClassNotFoundException e ) {
416
417
log .errorf (e , "Failed to process FTL method %s.%s" , method .declaringClass ().name (), method .name ());
417
418
validationFailures .add (new ValidationFailure (toError (forMethod (method )),
418
- "Failed to process FTL method " + method .declaringClass ().name () + "." + method .name ()));
419
+ "Failed to process FTL method " + method .declaringClass ().name () + "." + method .name () + " "
420
+ + e .getMessage ()));
419
421
}
420
422
}
421
423
@@ -480,7 +482,11 @@ public Type buildType(org.jboss.jandex.Type type, boolean export, Nullability nu
480
482
}
481
483
case CLASS -> {
482
484
var clazz = type .asClassType ();
485
+ if (clazz .name ().equals (FTLDotNames .KOTLIN_UNIT )) {
486
+ return Type .newBuilder ().setUnit (Unit .newBuilder ().build ()).build ();
487
+ }
483
488
var info = index .getClassByName (clazz .name ());
489
+
484
490
if (info != null && info .enclosingClass () != null && !Modifier .isStatic (info .flags ())) {
485
491
// proceed as normal, we fail at the end
486
492
validationFailures .add (new ValidationFailure (toError (forClass (clazz .name ().toString ())),
@@ -536,7 +542,7 @@ public Type buildType(org.jboss.jandex.Type type, boolean export, Nullability nu
536
542
var ref = Type .newBuilder ().setRef (
537
543
Ref .newBuilder ().setName (name ).setModule (moduleName ).build ()).build ();
538
544
539
- if (info .isEnum () || info .hasAnnotation (ENUM )) {
545
+ if (info != null && ( info .isEnum () || info .hasAnnotation (ENUM ) )) {
540
546
// Set only the name and export here. EnumProcessor will fill in the rest
541
547
xyz .block .ftl .schema .v1 .Enum .Builder ennum = xyz .block .ftl .schema .v1 .Enum .newBuilder ()
542
548
.setName (name )
0 commit comments