Skip to content

Commit

Permalink
Fail the build when a class cannot be found (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechhabarta committed Oct 2, 2022
1 parent d148d49 commit c98d7c9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ static List<Class<?>> loadClasses(List<String> classNames) {
final Class<?> cls = Thread.currentThread().getContextClassLoader().loadClass(className);
classes.add(cls);
} catch (ReflectiveOperationException e) {
TypeScriptGenerator.getLogger().error(String.format("Cannot load class '%s'", className));
e.printStackTrace(System.out);
final String errorMessage = String.format("Cannot load class '%s'", className);
TypeScriptGenerator.getLogger().error(errorMessage);
throw new RuntimeException(errorMessage, e);
}
}
return classes;
Expand Down

0 comments on commit c98d7c9

Please sign in to comment.