From 979f446580aa2299f47e83886520c59036c32cb1 Mon Sep 17 00:00:00 2001 From: carlosuc3m <100329787@alumnos.uc3m.es> Date: Fri, 20 Dec 2024 13:09:09 +0100 Subject: [PATCH] add more information to errors --- .../tensorflow/v1/Tensorflow1Interface.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/bioimage/modelrunner/tensorflow/v1/Tensorflow1Interface.java b/src/main/java/io/bioimage/modelrunner/tensorflow/v1/Tensorflow1Interface.java index 74d0b26..88194ae 100644 --- a/src/main/java/io/bioimage/modelrunner/tensorflow/v1/Tensorflow1Interface.java +++ b/src/main/java/io/bioimage/modelrunner/tensorflow/v1/Tensorflow1Interface.java @@ -220,11 +220,11 @@ private void launchModelLoadOnProcess() throws IOException, InterruptedException 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; - throw new RuntimeException(); + throw new RuntimeException(task.error); } } @@ -380,11 +380,11 @@ 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; - throw new RuntimeException(); + throw new RuntimeException(task.error); } for (int i = 0; i < outputTensors.size(); i ++) { String name = (String) Types.decode(encOuts.get(i)).get(MEM_NAME_KEY); @@ -508,11 +508,11 @@ public void closeModel() { 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; - throw new RuntimeException(); + throw new RuntimeException(task.error); } this.runner.close(); this.runner = null;