Unbox InvocationTargetException

This commit is contained in:
Volker Berlin 2020-01-01 23:04:51 +01:00
parent 6285aee077
commit 820a686192

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2017 - 2019 Volker Berlin (i-net software) * Copyright 2017 - 2020 Volker Berlin (i-net software)
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -26,6 +26,7 @@ import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.lang.ProcessBuilder.Redirect; import java.lang.ProcessBuilder.Redirect;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
@ -394,10 +395,12 @@ public class WasmRule extends TemporaryFolder {
actual = actualStr; actual = actualStr;
} }
assertEquals( expected, actual ); assertEquals( expected, actual );
} catch( InvocationTargetException ex ) {
failed = true;
throwException( ex.getTargetException() );
} catch( Throwable ex ) { } catch( Throwable ex ) {
failed = true; failed = true;
throwException( ex ); throwException( ex );
return;
} }
} }