Index: ui/base/resource/resource_bundle_mac.mm |
diff --git a/ui/base/resource/resource_bundle_mac.mm b/ui/base/resource/resource_bundle_mac.mm |
index 13b277854f3e12584c259cd34e609f0693f00e8b..0a97f716e907080e6f5b57bef28de20467a0c6bc 100644 |
--- a/ui/base/resource/resource_bundle_mac.mm |
+++ b/ui/base/resource/resource_bundle_mac.mm |
@@ -39,8 +39,14 @@ base::FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) { |
} |
if (!resource_path) { |
- // Return just the name of the pack file. |
- return base::FilePath(base::SysNSStringToUTF8(name) + ".pak"); |
+ // Trying to load a resources file that doesn't exist is an error. Return |
+ // just the name of the pack file so that further down the line it is easier |
+ // to track down what happened. |
+ std::string name_string = base::SysNSStringToUTF8(name); |
+ std::string locale_string = base::SysNSStringToUTF8(mac_locale); |
+ LOG(ERROR) << "Tried to get the file path of a non-existent pak file '" |
+ << name_string << "' for locale '" << locale_string << "'"; |
+ return base::FilePath(name_string + ".pak"); |
} |
return base::FilePath([resource_path fileSystemRepresentation]); |