Merge pull request #728 from sparkle-project/logs

Logs
This commit is contained in:
Kornel committed 2016-02-05 00:30:24 +00:00
commit b3dbb5db1f
3 files changed
+13 -2

No files matched your search

+5 -1
View File
@@ -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;
+6 -1
View File
@@ -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];
+2
View File
@@ -16,6 +16,7 @@
#import <WebKit/WebKit.h>
#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;
}