diff options
author | Benoit Lamarche <benoitlamarche@google.com> | 2018-01-22 17:38:41 +0100 |
---|---|---|
committer | Benoit Lamarche <benoitlamarche@google.com> | 2018-01-22 17:42:21 +0100 |
commit | 9f17dfcba6f286bca0fb47c32105c07328a4cc5c (patch) | |
tree | 09240955569f717529a572ce2fec9d254c00e321 /tools | |
parent | b3c2efc6156cb86ae1f8958ee89a8ac404b190df (diff) |
Fail when there is an ASM error
Otherwise during a build, Locked Region Code Injection may encounter an
ASM Analyzer exception, and the build will not fail, even though
injection won't have succeeded.
Test: make
Change-Id: Iee69f1a78fde735db62c7f73405b8cec4e410793
Diffstat (limited to 'tools')
-rw-r--r-- | tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java b/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java index ee0e36c9f76e..81a077324e6c 100644 --- a/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java +++ b/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java @@ -18,7 +18,6 @@ import java.util.Arrays; import java.util.LinkedList; import java.util.List; import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.Label; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; import org.objectweb.asm.commons.TryCatchBlockSorter; @@ -101,7 +100,7 @@ class LockFindingClassVisitor extends ClassVisitor { try { a.analyze(owner, mn); } catch (AnalyzerException e) { - e.printStackTrace(); + throw new RuntimeException("Locked region code injection: " + e.getMessage(), e); } InsnList instructions = mn.instructions; |