Browse Source

Made the Name error say which class caused the issue

Jared 5 years ago
parent
commit
d9e8ef65ea
No account linked to committer's email address

+ 1
- 1
JavaIntegration/src/main/java/org/openzen/zencode/java/JavaNativeModule.java View File

274
 				className = className.substring(className.lastIndexOf('.') + 1);
274
 				className = className.substring(className.lastIndexOf('.') + 1);
275
 			} else if (specifiedName.indexOf('.') >= 0) {
275
 			} else if (specifiedName.indexOf('.') >= 0) {
276
 				if (!specifiedName.startsWith(pkg.fullName))
276
 				if (!specifiedName.startsWith(pkg.fullName))
277
-					throw new IllegalArgumentException("Specified @Name as " + specifiedName + " but it's not in the module root package");
277
+					throw new IllegalArgumentException("Specified @Name as \"" + specifiedName + "\" for class: \"" + cls.toString() + "\" but it's not in the module root package");
278
 
278
 
279
 				classPkg = getPackage(basePackage + specifiedName.substring(pkg.fullName.length()));
279
 				classPkg = getPackage(basePackage + specifiedName.substring(pkg.fullName.length()));
280
 				className = className.substring(className.lastIndexOf('.') + 1);
280
 				className = className.substring(className.lastIndexOf('.') + 1);

Loading…
Cancel
Save