Skip to content

Commit 6958a83

Browse files
committed
[PlaygroundLogger] Replaced the last unimplemented with an error and a TODO.
Pattern colors are not trivial to handle, so rather than crash in the face of pattern colors, throw an `encodingFailure` error. Since nothing is marked as `unimplemented`, deleted `unimplemented` from PlaygroundLogger.
1 parent ca75e78 commit 6958a83

File tree

3 files changed

+2
-26
lines changed

3 files changed

+2
-26
lines changed

PlaygroundLogger/PlaygroundLogger.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
5E27568F1FCF964400B69C83 /* NSBitmapImageRep+CustomOpaqueLoggable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E27568E1FCF964400B69C83 /* NSBitmapImageRep+CustomOpaqueLoggable.swift */; };
7373
5E2756911FCF967300B69C83 /* NSBitmapImageRep+OpaqueImageRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E2756901FCF967300B69C83 /* NSBitmapImageRep+OpaqueImageRepresentable.swift */; };
7474
5E2756941FCF9CB000B69C83 /* SpriteKitOpaqueLoggable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E2756931FCF9CB000B69C83 /* SpriteKitOpaqueLoggable.swift */; };
75-
5E4AF1AD1FDDBDE400B7C9D9 /* Unimplemented.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E4AF1AC1FDDBDE400B7C9D9 /* Unimplemented.swift */; };
7675
5E4AF1AF1FDDC12A00B7C9D9 /* LegacyEntrypoints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E4AF1AE1FDDC12A00B7C9D9 /* LegacyEntrypoints.swift */; };
7776
5E5D77802040BD7D00EBC3A9 /* LogPolicyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E5D777F2040BD7D00EBC3A9 /* LogPolicyTests.swift */; };
7877
5E5D77812040BD7D00EBC3A9 /* LogPolicyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E5D777F2040BD7D00EBC3A9 /* LogPolicyTests.swift */; };
@@ -241,7 +240,6 @@
241240
5E27568E1FCF964400B69C83 /* NSBitmapImageRep+CustomOpaqueLoggable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSBitmapImageRep+CustomOpaqueLoggable.swift"; sourceTree = "<group>"; };
242241
5E2756901FCF967300B69C83 /* NSBitmapImageRep+OpaqueImageRepresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSBitmapImageRep+OpaqueImageRepresentable.swift"; sourceTree = "<group>"; };
243242
5E2756931FCF9CB000B69C83 /* SpriteKitOpaqueLoggable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpriteKitOpaqueLoggable.swift; sourceTree = "<group>"; };
244-
5E4AF1AC1FDDBDE400B7C9D9 /* Unimplemented.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Unimplemented.swift; sourceTree = "<group>"; };
245243
5E4AF1AE1FDDC12A00B7C9D9 /* LegacyEntrypoints.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyEntrypoints.swift; sourceTree = "<group>"; };
246244
5E5D777F2040BD7D00EBC3A9 /* LogPolicyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogPolicyTests.swift; sourceTree = "<group>"; };
247245
5E5D77832040F5E900EBC3A9 /* LoggingError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggingError.swift; sourceTree = "<group>"; };
@@ -565,7 +563,6 @@
565563
5E4AF1AB1FDDBDCD00B7C9D9 /* Utilities */ = {
566564
isa = PBXGroup;
567565
children = (
568-
5E4AF1AC1FDDBDE400B7C9D9 /* Unimplemented.swift */,
569566
5E5D77832040F5E900EBC3A9 /* LoggingError.swift */,
570567
5E184716202BB80200F01AD1 /* PGLConcurrentMap.h */,
571568
5E184717202BB80200F01AD1 /* PGLConcurrentMap_MRR.m */,
@@ -889,7 +886,6 @@
889886
5E2756911FCF967300B69C83 /* NSBitmapImageRep+OpaqueImageRepresentable.swift in Sources */,
890887
5E5FE50B202D13C800E28C3C /* PGLConcurrentMap.swift in Sources */,
891888
5E2756891FCF454D00B69C83 /* UIColor+CustomOpaqueLoggable.swift in Sources */,
892-
5E4AF1AD1FDDBDE400B7C9D9 /* Unimplemented.swift in Sources */,
893889
5E27566E1FC51F7E00B69C83 /* CGGeometry+CustomOpaqueLoggable.swift in Sources */,
894890
5E2756201FC485AA00B69C83 /* TaggedOpaqueRepresentation.swift in Sources */,
895891
5E2646431FB64B2A002DC6B6 /* LoggerEntrypoints.swift in Sources */,

PlaygroundLogger/PlaygroundLogger/OpaqueRepresentations/CoreGraphics/CGColor+KeyedArchiveOpaqueRepresentation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ extension CGColor: KeyedArchiveOpaqueRepresentation {
2727
}
2828

2929
guard colorSpace.model != .pattern else {
30-
unimplemented("Need to handle pattern colors")
30+
// TODO: implement support for encoding pattern colors.
31+
throw LoggingError.encodingFailure(reason: "Unable to encode pattern colors at this time")
3132
}
3233

3334
guard let colorSpaceName = colorSpace.name, let components = self.components else {

PlaygroundLogger/PlaygroundLogger/Utilities/Unimplemented.swift

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)