News for hackers. Stuff that matters.
Re:Xcode 9.1 Improves Display of Fatal Errors by pavlov on Friday October 06, 2017 @03:17PM (#15419584)
There are a few places in AppKit where you need to determine an object's state by catching an exception because there's no method available. (Checking whether an NSColor is a pattern comes to mind -- only way is to try getting the pattern image and it will throw if it's not a pattern color.)

The really frustrating thing is that Obj-C didn't even have exceptions originally, so someone basically looked at exceptions when they were added and thought: "I know, I'll use them as part of the API"...

Re:Xcode 9.1 Improves Display of Fatal Errors by mnem on Friday October 06, 2017 @03:43PM (#15419794)
Can't you check if the NSColor.type == NSColorTypePattern?
Re:Xcode 9.1 Improves Display of Fatal Errors by pavlov on Friday October 06, 2017 @03:57PM (#15419897)
I might be misremembering that one! Will have to check. Thanks!
Re:Xcode 9.1 Improves Display of Fatal Errors by eridius on Friday October 06, 2017 @04:28PM (#15420171)
NSColor.type is new in macOS 10.13.