@@ -220,11 +220,11 @@ private void launchModelLoadOnProcess() throws IOException, InterruptedException
220
220
if (task .status == TaskStatus .CANCELED )
221
221
throw new RuntimeException ();
222
222
else if (task .status == TaskStatus .FAILED )
223
- throw new RuntimeException ();
223
+ throw new RuntimeException (task . error );
224
224
else if (task .status == TaskStatus .CRASHED ) {
225
225
this .runner .close ();
226
226
runner = null ;
227
- throw new RuntimeException ();
227
+ throw new RuntimeException (task . error );
228
228
}
229
229
}
230
230
@@ -380,11 +380,11 @@ void runInterprocessing(List<Tensor<T>> inputTensors, List<Tensor<R>> outputTens
380
380
if (task .status == TaskStatus .CANCELED )
381
381
throw new RuntimeException ();
382
382
else if (task .status == TaskStatus .FAILED )
383
- throw new RuntimeException ();
383
+ throw new RuntimeException (task . error );
384
384
else if (task .status == TaskStatus .CRASHED ) {
385
385
this .runner .close ();
386
386
runner = null ;
387
- throw new RuntimeException ();
387
+ throw new RuntimeException (task . error );
388
388
}
389
389
for (int i = 0 ; i < outputTensors .size (); i ++) {
390
390
String name = (String ) Types .decode (encOuts .get (i )).get (MEM_NAME_KEY );
@@ -508,11 +508,11 @@ public void closeModel() {
508
508
if (task .status == TaskStatus .CANCELED )
509
509
throw new RuntimeException ();
510
510
else if (task .status == TaskStatus .FAILED )
511
- throw new RuntimeException ();
511
+ throw new RuntimeException (task . error );
512
512
else if (task .status == TaskStatus .CRASHED ) {
513
513
this .runner .close ();
514
514
runner = null ;
515
- throw new RuntimeException ();
515
+ throw new RuntimeException (task . error );
516
516
}
517
517
this .runner .close ();
518
518
this .runner = null ;
0 commit comments