@@ -198,11 +198,11 @@ private void launchModelLoadOnProcess() throws IOException, InterruptedException
198
198
if (task .status == TaskStatus .CANCELED )
199
199
throw new RuntimeException ();
200
200
else if (task .status == TaskStatus .FAILED )
201
- throw new RuntimeException ();
201
+ throw new RuntimeException (task . error );
202
202
else if (task .status == TaskStatus .CRASHED ) {
203
203
this .runner .close ();
204
204
runner = null ;
205
- throw new RuntimeException ();
205
+ throw new RuntimeException (task . error );
206
206
}
207
207
}
208
208
@@ -363,11 +363,11 @@ void runInterprocessing(List<Tensor<T>> inputTensors, List<Tensor<R>> outputTens
363
363
if (task .status == TaskStatus .CANCELED )
364
364
throw new RuntimeException ();
365
365
else if (task .status == TaskStatus .FAILED )
366
- throw new RuntimeException ();
366
+ throw new RuntimeException (task . error );
367
367
else if (task .status == TaskStatus .CRASHED ) {
368
368
this .runner .close ();
369
369
runner = null ;
370
- throw new RuntimeException ();
370
+ throw new RuntimeException (task . error );
371
371
}
372
372
for (int i = 0 ; i < outputTensors .size (); i ++) {
373
373
String name = (String ) Types .decode (encOuts .get (i )).get (MEM_NAME_KEY );
@@ -487,11 +487,11 @@ public void closeModel() {
487
487
if (task .status == TaskStatus .CANCELED )
488
488
throw new RuntimeException ();
489
489
else if (task .status == TaskStatus .FAILED )
490
- throw new RuntimeException ();
490
+ throw new RuntimeException (task . error );
491
491
else if (task .status == TaskStatus .CRASHED ) {
492
492
this .runner .close ();
493
493
runner = null ;
494
- throw new RuntimeException ();
494
+ throw new RuntimeException (task . error );
495
495
}
496
496
this .runner .close ();
497
497
this .runner = null ;
0 commit comments