mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
Ignore parsing errors on non *.class files which can be add through build systems. #41
This commit is contained in:
parent
ad93c2c10b
commit
97f9fb39a7
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 - 2020 Volker Berlin (i-net software)
|
||||
* Copyright 2017 - 2022 Volker Berlin (i-net software)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -362,7 +362,11 @@ public class JWebAssembly {
|
||||
ClassFile classFile = new ClassFile( new BufferedInputStream( url.openStream() ) );
|
||||
generator.prepare( classFile );
|
||||
} catch( IOException ex ) {
|
||||
throw WasmException.create( "Parsing of file " + url + " failed.", ex );
|
||||
LOGGER.fine( url + " " + ex );
|
||||
if( url.getFile().endsWith( ".class" ) ) {
|
||||
throw WasmException.create( "Parsing of file " + url + " failed.", ex );
|
||||
}
|
||||
// does not throw an exception on non *.class files like resource files or *.kotlin_module
|
||||
}
|
||||
}
|
||||
generator.prepareFinish();
|
||||
|
Loading…
x
Reference in New Issue
Block a user