Bug 1286490 - Improve logging when unable to clean up elevated updater on OSX. r=mstange
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Fri, 12 Aug 2016 09:53:00 -0400
changeset 400785 9b1f6f45c1d765c4df85f369e19bb5b2503b7cf3
parent 400784 59055929012280084afd040bfdf4216083a7636a
child 400786 a8e4a3aafbd968696780666a12d77f4787b7198f
push id26284
push usermwein@mozilla.com
push dateMon, 15 Aug 2016 20:48:20 +0000
reviewersmstange
bugs1286490
milestone51.0a1
Bug 1286490 - Improve logging when unable to clean up elevated updater on OSX. r=mstange
toolkit/mozapps/update/updater/launchchild_osx.mm
toolkit/xre/MacLaunchHelper.mm
--- a/toolkit/mozapps/update/updater/launchchild_osx.mm
+++ b/toolkit/mozapps/update/updater/launchchild_osx.mm
@@ -126,17 +126,17 @@ id ConnectToUpdateServer()
         NSLog(@"Server doesn't exist or doesn't provide correct selectors.");
         sleep(1); // Wait 1 second.
         currTry++;
       } else {
         isConnected = YES;
       }
     }
   } @catch (NSException* e) {
-    // Ignore exceptions.
+    NSLog(@"%@: %@", e.name, e.reason);
     return nil;
   }
   return updateServer;
 }
 
 void CleanupElevatedMacUpdate(bool aFailureOccurred)
 {
   MacAutoreleasePool pool;
--- a/toolkit/xre/MacLaunchHelper.mm
+++ b/toolkit/xre/MacLaunchHelper.mm
@@ -164,17 +164,17 @@ void AbortElevatedUpdate()
         [updateServer performSelector:@selector(abort)];
         return;
       }
       NSLog(@"Server doesn't exist or doesn't provide correct selectors.");
       sleep(1); // Wait 1 second.
       currTry++;
     }
   } @catch (NSException* e) {
-    // Ignore exceptions.
+    NSLog(@"%@: %@", e.name, e.reason);
   }
   NSLog(@"Unable to clean up updater.");
 }
 
 bool LaunchElevatedUpdate(int argc, char** argv, uint32_t aRestartType,
                           pid_t* pid)
 {
   LaunchChildMac(argc, argv, aRestartType, pid);