Report the error message from CheckAndCountBCPComponents in debug builds
Test: the error shows up when class path components are missing
Change-Id: If255ccbd6704a4a20ff0c5b73ae1994e96eab730
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index 9e0c173..320e827 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -787,11 +787,11 @@
size_t oat_bcp_size = gc::space::ImageSpace::CheckAndCountBCPComponents(
oat_boot_class_path, ArrayRef<const std::string>(bcp_locations), error_msg);
- DCHECK_LE(oat_bcp_size, bcp_locations.size());
if (oat_bcp_size == static_cast<size_t>(-1)) {
DCHECK(!error_msg->empty());
return false;
}
+ DCHECK_LE(oat_bcp_size, bcp_locations.size());
size_t bcp_index = 0;
size_t boot_image_index = 0;