mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
also print the generated JavaScript on error
This commit is contained in:
parent
1d5f097dd8
commit
f3bcd8e670
@ -30,6 +30,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@ -174,10 +175,21 @@ public class WasmRule extends TemporaryFolder {
|
||||
*/
|
||||
@Override
|
||||
protected void after() {
|
||||
super.after();
|
||||
if( failed ) {
|
||||
if( wasmFile != null ) {
|
||||
File jsFile = new File( wasmFile.toString() + ".js" );
|
||||
if( jsFile.isFile() ) {
|
||||
try {
|
||||
System.out.println( new String( Files.readAllBytes( jsFile.toPath() ), StandardCharsets.UTF_8 ) );
|
||||
System.out.println();
|
||||
} catch( IOException e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println( textCompiled );
|
||||
}
|
||||
super.after();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user