Add name of missing class to ClassNotFoundException
Add name of missing class to ClassNotFoundException can help the user to understand which entry is missing on its classpath or bootclasspath.
MOS_MIGRATED_REVID=150725247
@@ -48,7 +48,7 @@ class HeaderClassLoader extends ClassLoader {
String filename = rewriter.unprefix(name.replace('.', '/') + ".class");
InputFileProvider inputFileProvider = indexedInputs.getInputFileProvider(filename);
if (inputFileProvider == null) {
- throw new ClassNotFoundException();
+ throw new ClassNotFoundException("Class " + name + " not found");
}
byte[] bytecode;
try (InputStream content = inputFileProvider.getInputStream(filename)) {
