[Soot-list] ThrowableSet.catchableAs()

Chris Pickett chris.pickett at mail.mcgill.ca
Tue Mar 18 09:48:57 EDT 2008


Eric Bodden wrote:
> Hi, Irem.
> 
>>  Exception in thread "main" java.lang.RuntimeException: This operation
>>  requires resolving level HIERARCHY but
>>  java.lang.UnsupportedClassVersionError is at resolving level DANGLING
>>         at soot.SootClass.checkLevel(SootClass.java:121)
>>         at soot.FastHierarchy.canStoreClass(FastHierarchy.java:269)
>>         at soot.FastHierarchy.canStoreType(FastHierarchy.java:204)
>>         at
>>  soot.toolkits.exceptions.ThrowableSet.catchableAs(ThrowableSet.java:904)
>>  ----------------
>>
>>  Does anyone know what I am doing wrong?
> 
> To determine whether UnsupportedClassVersionError is of one of the
> types you care about (or a subtype thereof), it needs hierarchy
> information about the class. However, by default Soot won't construct
> this information for all classes, unless you are in whole-program mode
> or you explicitly tell Soot to do so.
> 
> Try to do this right at the beginning of your code, ideally before
> calling soot.Main.main(..):
> 
> Scene.v().addBasicClass("java.lang.UnsupportedClassVersionError",SootClass.SIGNATURES);
> 
> This will advise Soot to resolve this class to the SIGNATURES level
> when it's loaded.

I think this kind of error message provokes enough questions for the 
message to have more useful information appended to it.  (Changing the 
existing text of the message kills the ability to Google for it.)

Chris


More information about the Soot-list mailing list