more robust error message
All checks were successful
studiorailgun/highlevel-netcode-gen/pipeline/head This commit looks good

This commit is contained in:
austin 2024-09-03 22:39:01 -04:00
parent 1f7cf080f7
commit 56a83c9984

View File

@ -71,7 +71,10 @@ public class ClassSourceUtils {
for(MethodSource<JavaClassSource> methodRaw : methods){
if(methodRaw.getName().equals(methodName)){
if(methodSource != null){
throw new UnknownError("Two methods in a source file have the same name. This is unsupported by the addOrReplaceMethod function at this time!");
String message = "Two methods in a source file have the same name. This is unsupported by the addOrReplaceMethod function at this time!\n" +
"Method name: " + methodName
;
throw new UnknownError(message);
}
methodSource = methodRaw;
}