@@ -198,11 +198,11 @@ private void launchModelLoadOnProcess() throws IOException, InterruptedException
198198 if (task .status == TaskStatus .CANCELED )
199199 throw new RuntimeException ();
200200 else if (task .status == TaskStatus .FAILED )
201- throw new RuntimeException ();
201+ throw new RuntimeException (task . error );
202202 else if (task .status == TaskStatus .CRASHED ) {
203203 this .runner .close ();
204204 runner = null ;
205- throw new RuntimeException ();
205+ throw new RuntimeException (task . error );
206206 }
207207 }
208208
@@ -363,11 +363,11 @@ void runInterprocessing(List<Tensor<T>> inputTensors, List<Tensor<R>> outputTens
363363 if (task .status == TaskStatus .CANCELED )
364364 throw new RuntimeException ();
365365 else if (task .status == TaskStatus .FAILED )
366- throw new RuntimeException ();
366+ throw new RuntimeException (task . error );
367367 else if (task .status == TaskStatus .CRASHED ) {
368368 this .runner .close ();
369369 runner = null ;
370- throw new RuntimeException ();
370+ throw new RuntimeException (task . error );
371371 }
372372 for (int i = 0 ; i < outputTensors .size (); i ++) {
373373 String name = (String ) Types .decode (encOuts .get (i )).get (MEM_NAME_KEY );
@@ -487,11 +487,11 @@ public void closeModel() {
487487 if (task .status == TaskStatus .CANCELED )
488488 throw new RuntimeException ();
489489 else if (task .status == TaskStatus .FAILED )
490- throw new RuntimeException ();
490+ throw new RuntimeException (task . error );
491491 else if (task .status == TaskStatus .CRASHED ) {
492492 this .runner .close ();
493493 runner = null ;
494- throw new RuntimeException ();
494+ throw new RuntimeException (task . error );
495495 }
496496 this .runner .close ();
497497 this .runner = null ;
0 commit comments