Skip to content

Commit c98d7c9

Browse files
Fail the build when a class cannot be found (#315)
1 parent d148d49 commit c98d7c9

File tree

1 file changed

+3
-2
lines changed
  • typescript-generator-core/src/main/java/cz/habarta/typescript/generator

1 file changed

+3
-2
lines changed

typescript-generator-core/src/main/java/cz/habarta/typescript/generator/Input.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ static List<Class<?>> loadClasses(List<String> classNames) {
189189
final Class<?> cls = Thread.currentThread().getContextClassLoader().loadClass(className);
190190
classes.add(cls);
191191
} catch (ReflectiveOperationException e) {
192-
TypeScriptGenerator.getLogger().error(String.format("Cannot load class '%s'", className));
193-
e.printStackTrace(System.out);
192+
final String errorMessage = String.format("Cannot load class '%s'", className);
193+
TypeScriptGenerator.getLogger().error(errorMessage);
194+
throw new RuntimeException(errorMessage, e);
194195
}
195196
}
196197
return classes;

0 commit comments

Comments
 (0)