diff --git a/mantis-runtime/src/main/java/io/mantisrx/runtime/command/LoadValidateCreateZip.java b/mantis-runtime/src/main/java/io/mantisrx/runtime/command/LoadValidateCreateZip.java index 254893aef..19c81dbdd 100644 --- a/mantis-runtime/src/main/java/io/mantisrx/runtime/command/LoadValidateCreateZip.java +++ b/mantis-runtime/src/main/java/io/mantisrx/runtime/command/LoadValidateCreateZip.java @@ -18,8 +18,9 @@ import io.mantisrx.runtime.Job; import java.io.File; +import lombok.extern.slf4j.Slf4j; - +@Slf4j public class LoadValidateCreateZip implements Command { private final String jobZipFile; @@ -54,7 +55,13 @@ public static void main(String[] args) throws CommandException { readyForJobMaster = Boolean.parseBoolean(args[4]); } - new LoadValidateCreateZip(jobZipFile, name, version, outputLocation, readyForJobMaster).execute(); + try { + new LoadValidateCreateZip(jobZipFile, name, version, outputLocation, readyForJobMaster).execute(); + } catch (Exception e) { + // print stack trace + log.error("Failed with the following exception: ", e); + System.exit(1); + } } @SuppressWarnings("rawtypes")