Bläddra i källkod

http connection: add error code path if we can't return a thumbnail

Felix Paul Kühne 9 år sedan
förälder
incheckning
604d39c66b
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      Sources/VLCHTTPConnection.m

+ 2 - 1
Sources/VLCHTTPConnection.m

@@ -128,7 +128,7 @@
             @try {
                 mo = [moc existingObjectWithID:[psc managedObjectIDForURIRepresentation:[NSURL URLWithString:filePath]] error:nil];
             }@catch (NSException *exeption) {
-                // somebody gave us a malformed or stale URIRepresentation
+                return [[HTTPErrorResponse alloc] initWithErrorCode:404];
             }
 
             NSData *theData;
@@ -151,6 +151,7 @@
             }
         }
     }
+    return [[HTTPErrorResponse alloc] initWithErrorCode:404];
 }
 
 - (NSObject<HTTPResponse> *)_httpGETLibraryForPath:(NSString *)path