@@ -211,11 +211,11 @@ private void launchModelLoadOnProcess() throws IOException, InterruptedException
211
211
if (task .status == TaskStatus .CANCELED )
212
212
throw new RuntimeException ();
213
213
else if (task .status == TaskStatus .FAILED )
214
- throw new RuntimeException ();
214
+ throw new RuntimeException (task . error );
215
215
else if (task .status == TaskStatus .CRASHED ) {
216
216
this .runner .close ();
217
217
runner = null ;
218
- throw new RuntimeException ();
218
+ throw new RuntimeException (task . error );
219
219
}
220
220
}
221
221
@@ -371,11 +371,11 @@ void runInterprocessing(List<Tensor<T>> inputTensors, List<Tensor<R>> outputTens
371
371
if (task .status == TaskStatus .CANCELED )
372
372
throw new RuntimeException ();
373
373
else if (task .status == TaskStatus .FAILED )
374
- throw new RuntimeException ();
374
+ throw new RuntimeException (task . error );
375
375
else if (task .status == TaskStatus .CRASHED ) {
376
376
this .runner .close ();
377
377
runner = null ;
378
- throw new RuntimeException ();
378
+ throw new RuntimeException (task . error );
379
379
}
380
380
for (int i = 0 ; i < outputTensors .size (); i ++) {
381
381
String name = (String ) Types .decode (encOuts .get (i )).get (MEM_NAME_KEY );
@@ -496,11 +496,11 @@ public void closeModel() {
496
496
if (task .status == TaskStatus .CANCELED )
497
497
throw new RuntimeException ();
498
498
else if (task .status == TaskStatus .FAILED )
499
- throw new RuntimeException ();
499
+ throw new RuntimeException (task . error );
500
500
else if (task .status == TaskStatus .CRASHED ) {
501
501
this .runner .close ();
502
502
runner = null ;
503
- throw new RuntimeException ();
503
+ throw new RuntimeException (task . error );
504
504
}
505
505
this .runner .close ();
506
506
this .runner = null ;
0 commit comments