diff --git a/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/JavaWorker.java b/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/JavaWorker.java index e353b2f..554f933 100644 --- a/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/JavaWorker.java +++ b/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/JavaWorker.java @@ -93,7 +93,7 @@ private void executeScript(String script, Map inputs) { } else if (script.equals("close")) { pi.closeModel(); } - } catch(Exception ex) { + } catch(Exception | Error ex) { this.fail(Types.stackTrace(ex)); return; }