diff --git a/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/PytorchJavaCPPInterface.java b/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/PytorchJavaCPPInterface.java index bc3caa0..c8d156a 100644 --- a/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/PytorchJavaCPPInterface.java +++ b/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/PytorchJavaCPPInterface.java @@ -306,7 +306,7 @@ void runInterprocessing(List> inputTensors, List> outputTens if (task.status == TaskStatus.CANCELED) throw new RuntimeException(); else if (task.status == TaskStatus.FAILED) - throw new RuntimeException(); + throw new RuntimeException(task.error); else if (task.status == TaskStatus.CRASHED) { this.runner.close(); runner = null;