Verifier should not exit with exceptions pending.
Change-Id: Ibf820594883b345c55e9f636d937aae6506706d6
diff --git a/src/compiler.cc b/src/compiler.cc
index d29e8ca..34263da 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -183,15 +183,8 @@
}
CHECK(klass->IsResolved()) << PrettyClass(klass);
class_linker->VerifyClass(klass);
- CHECK(klass->IsVerified() || klass->IsErroneous()) << PrettyClass(klass);
- //CHECK(!Thread::Current()->IsExceptionPending());
- if (klass->IsErroneous()) {
- Thread* self = Thread::Current();
- if (self->IsExceptionPending()) {
- UNIMPLEMENTED(WARNING) << "Verifier failed to cleanup exceptions internally";
- self->ClearException();
- }
- }
+ CHECK(klass->IsVerified() || klass->IsResolved()) << PrettyClass(klass);
+ CHECK(!Thread::Current()->IsExceptionPending()) << PrettyTypeOf(Thread::Current()->GetException());
}
dex_file.ChangePermissions(PROT_READ);
}