diff options
| author | 2022-10-14 02:18:37 +0000 | |
|---|---|---|
| committer | 2022-10-14 02:21:06 +0000 | |
| commit | b406b0e56546ce16f4768c82a5cdad19535122c8 (patch) | |
| tree | 2d51a7d302f96b09d414233dfc936d6783a71c56 /libs/androidfw/AssetManager2.cpp | |
| parent | 8314a3e51bd31e9c11a9b61e4bef88b2ad65803d (diff) | |
Give slightly more descriptive error messages when you can't find resource IDs
This makes the error message slightly more googleable, and gives a hint as to what kind of ID could be wrong.
This was motivated by me struggling to find the source of this error in my logs.
Change-Id: Ide248edc08d24c5577dd2198233b738641e124ec
Diffstat (limited to 'libs/androidfw/AssetManager2.cpp')
| -rw-r--r-- | libs/androidfw/AssetManager2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp index 136fc6ca4e2a..400829e15364 100644 --- a/libs/androidfw/AssetManager2.cpp +++ b/libs/androidfw/AssetManager2.cpp @@ -580,7 +580,7 @@ base::expected<FindEntryResult, NullOrIOError> AssetManager2::FindEntry( // Retrieve the package group from the package id of the resource id. if (UNLIKELY(!is_valid_resid(resid))) { - LOG(ERROR) << base::StringPrintf("Invalid ID 0x%08x.", resid); + LOG(ERROR) << base::StringPrintf("Invalid resource ID 0x%08x.", resid); return base::unexpected(std::nullopt); } @@ -589,7 +589,7 @@ base::expected<FindEntryResult, NullOrIOError> AssetManager2::FindEntry( const uint16_t entry_idx = get_entry_id(resid); uint8_t package_idx = package_ids_[package_id]; if (UNLIKELY(package_idx == 0xff)) { - ANDROID_LOG(ERROR) << base::StringPrintf("No package ID %02x found for ID 0x%08x.", + ANDROID_LOG(ERROR) << base::StringPrintf("No package ID %02x found for resource ID 0x%08x.", package_id, resid); return base::unexpected(std::nullopt); } |