diff --git a/typescript-generator-core/src/main/java/cz/habarta/typescript/generator/Input.java b/typescript-generator-core/src/main/java/cz/habarta/typescript/generator/Input.java index 847c065fa..6a7275988 100644 --- a/typescript-generator-core/src/main/java/cz/habarta/typescript/generator/Input.java +++ b/typescript-generator-core/src/main/java/cz/habarta/typescript/generator/Input.java @@ -189,8 +189,9 @@ static List> loadClasses(List 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;