mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 15:37:52 +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.lang.reflect.Method;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.nio.file.Files;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -174,10 +175,21 @@ public class WasmRule extends TemporaryFolder {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void after() {
|
protected void after() {
|
||||||
super.after();
|
|
||||||
if( failed ) {
|
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 );
|
System.out.println( textCompiled );
|
||||||
}
|
}
|
||||||
|
super.after();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user