summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 20:16:28 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 20:16:28 +0000
commit75e50df09cedc5b78574531c95316cdccbd7950c (patch)
tree63ca5bfc014ed726a86fba2086a3e1aac54fe141 /base
parent54cfe539739c24fbdccb938341002b498894b67a (diff)
downloadchromium_src-75e50df09cedc5b78574531c95316cdccbd7950c.zip
chromium_src-75e50df09cedc5b78574531c95316cdccbd7950c.tar.gz
chromium_src-75e50df09cedc5b78574531c95316cdccbd7950c.tar.bz2
[Mac] Return better error messages when AmIBundled() fails. We're seeing this error on the bots, so better messages may help us track down the problem.
BUG=None TEST=None Review URL: http://codereview.chromium.org/3625003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/mac_util.mm12
1 files changed, 7 insertions, 5 deletions
diff --git a/base/mac_util.mm b/base/mac_util.mm
index 6924e6a..b3a594a 100644
--- a/base/mac_util.mm
+++ b/base/mac_util.mm
@@ -148,15 +148,17 @@ bool AmIBundled() {
ProcessSerialNumber psn = {0, kCurrentProcess};
FSRef fsref;
- if (GetProcessBundleLocation(&psn, &fsref) != noErr) {
- LOG(ERROR) << "GetProcessBundleLocation failed, returning false";
+ OSStatus pbErr;
+ if ((pbErr = GetProcessBundleLocation(&psn, &fsref)) != noErr) {
+ LOG(ERROR) << "GetProcessBundleLocation failed: error " << pbErr;
return false;
}
FSCatalogInfo info;
- if (FSGetCatalogInfo(&fsref, kFSCatInfoNodeFlags, &info,
- NULL, NULL, NULL) != noErr) {
- LOG(ERROR) << "FSGetCatalogInfo failed, returning false";
+ OSErr fsErr;
+ if ((fsErr = FSGetCatalogInfo(&fsref, kFSCatInfoNodeFlags, &info,
+ NULL, NULL, NULL)) != noErr) {
+ LOG(ERROR) << "FSGetCatalogInfo failed: error " << fsErr;
return false;
}