diff --git a/Sparkle/SUAppcast.m b/Sparkle/SUAppcast.m index cd44a25b..7690028c 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -229,7 +229,11 @@ } if (failed) { - [self reportError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastParseError userInfo:@{ NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while parsing the update feed.", nil) }]]; + [self reportError:[NSError errorWithDomain:SUSparkleErrorDomain + code:SUAppcastParseError + userInfo:@{ + NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while parsing the update feed.", nil), + NSUnderlyingErrorKey: error ? error : [NSNull null]}]]; } else { self.completionBlock(nil); self.completionBlock = nil; diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index ff6e74c3..56bef1b3 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -558,7 +558,12 @@ - (void)abortUpdateWithError:(NSError *)error { if ([error code] != SUNoUpdateError) { // Let's not bother logging this. - SULog(@"Error: %@ %@ (URL %@)", error.localizedDescription, error.localizedFailureReason, error.userInfo[NSURLErrorFailingURLErrorKey]); + NSError *errorToDisplay = error; + int finiteRecursion=5; + do { + SULog(@"Error: %@ %@ (URL %@)", errorToDisplay.localizedDescription, errorToDisplay.localizedFailureReason, errorToDisplay.userInfo[NSURLErrorFailingURLErrorKey]); + errorToDisplay = errorToDisplay.userInfo[NSUnderlyingErrorKey]; + } while(--finiteRecursion && errorToDisplay); } if (self.download) { [self.download cancel]; diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 0015f3f8..3433299d 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -16,6 +16,7 @@ #import #import "SUConstants.h" +#import "SULog.h" // WebKit protocols are not explicitly declared until 10.11 SDK, so // declare dummy protocols to keep the build working on earlier SDKs. @@ -261,6 +262,7 @@ // Do not allow redirects to dangerous protocols such as file:// if (!whitelistedSafe) { + SULog(@"Blocked display of %@ URL which may be dangerous", scheme); [listener ignore]; return; }