Improved Part API Errors.
This commit is contained in:
+15
-7
@@ -97,13 +97,20 @@ public class ApiPart implements IPartHelper
|
|||||||
|
|
||||||
public ClassNode getReader(String name) throws IOException
|
public ClassNode getReader(String name) throws IOException
|
||||||
{
|
{
|
||||||
ClassReader cr;
|
try
|
||||||
String path = "/" + name.replace( ".", "/" ) + ".class";
|
{
|
||||||
InputStream is = getClass().getResourceAsStream( path );
|
ClassReader cr;
|
||||||
cr = new ClassReader( is );
|
String path = "/" + name.replace( ".", "/" ) + ".class";
|
||||||
ClassNode cn = new ClassNode();
|
InputStream is = getClass().getResourceAsStream( path );
|
||||||
cr.accept( cn, ClassReader.EXPAND_FRAMES );
|
cr = new ClassReader( is );
|
||||||
return cn;
|
ClassNode cn = new ClassNode();
|
||||||
|
cr.accept( cn, ClassReader.EXPAND_FRAMES );
|
||||||
|
return cn;
|
||||||
|
}
|
||||||
|
catch (Throwable t)
|
||||||
|
{
|
||||||
|
throw new RuntimeException( "Error loading " + name, t );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class getCombinedInstance(String base)
|
public Class getCombinedInstance(String base)
|
||||||
@@ -167,6 +174,7 @@ public class ApiPart implements IPartHelper
|
|||||||
}
|
}
|
||||||
catch (Throwable t)
|
catch (Throwable t)
|
||||||
{
|
{
|
||||||
|
AELog.warning( "Error loading " + name );
|
||||||
AELog.error( t );
|
AELog.error( t );
|
||||||
// throw new RuntimeException( t );
|
// throw new RuntimeException( t );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user