Made pass through trait generator fail quietly if the interface is not found.

This commit is contained in:
Chicken Bones committed 2013-09-22 14:08:54 +10:00
1 parent 7adbd583bd
commit 6da0eb07ea
2 files changed
+8 -1

No files matched your search

@@ -165,6 +165,9 @@ object MultipartGenerator
def registerPassThroughInterface(s_interface:String, client:Boolean, server:Boolean)
{
val tType = factory.generatePassThroughTrait(s_interface)
if(tType == null)
return
if(client)
{
if(interfaceTraitMap_c.contains(s_interface))
@@ -53,7 +53,7 @@ object ASMMixinFactory extends IMultipartFactory
class SuperSet(types:Seq[String], client:Boolean)
{
import SuperSet._
import SuperSet._
val set = baseType+:types.sorted
def baseType = if(client) TileMultipartClientType else TileMultipartType
@@ -197,6 +197,10 @@ import SuperSet._
val idesc = "L"+iname+";"
val inode = classNode(s_interface)
if(inode == null) {
System.out.println("Unable to generate pass through trait for: "+s_interface+" class not found.")
return null
}
if((inode.access&ACC_INTERFACE) == 0) throw new IllegalArgumentException(s_interface+" is not an interface.")
val cw = new CC_ClassWriter(ASM4)