more robust error message
All checks were successful
studiorailgun/highlevel-netcode-gen/pipeline/head This commit looks good
All checks were successful
studiorailgun/highlevel-netcode-gen/pipeline/head This commit looks good
This commit is contained in:
parent
1f7cf080f7
commit
56a83c9984
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user