Explorar o código

Add missing `else` for flex_copy method

vvveiii %!s(int64=6) %!d(string=hai) anos
pai
achega
3a9c24b784
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      Classes/Utility/Categories/UIPasteboard+FLEX.m

+ 4 - 3
Classes/Utility/Categories/UIPasteboard+FLEX.m

@@ -17,10 +17,11 @@
         [UIPasteboard.generalPasteboard setData:object forPasteboardType:@"public.data"];
     } else if ([object isKindOfClass:[NSNumber class]]) {
         UIPasteboard.generalPasteboard.string = [object stringValue];
+    } else {
+        // TODO: make this an alert instead of an exception
+        [NSException raise:NSInternalInconsistencyException
+                    format:@"Tried to copy unsupported type: %@", [object class]];
     }
-
-    [NSException raise:NSInternalInconsistencyException
-                format:@"Tried to copy unsupported type: %@", [object class]];
 }
 
 @end