Documentation Archive Developer
Search

ExceptionHandling Changes for Swift

ExceptionHandling

DeclarationProtocols
From
class NSExceptionHandler : NSObject {
    class func defaultExceptionHandler() -> NSExceptionHandler!
    func setExceptionHandlingMask(_ aMask: Int)
    func exceptionHandlingMask() -> Int
    func setExceptionHangingMask(_ aMask: Int)
    func exceptionHangingMask() -> Int
    func setDelegate(_ anObject: AnyObject!)
    func delegate() -> AnyObject!
}
--
To
class NSExceptionHandler : NSObject {
    class func `default`() -> NSExceptionHandler!
    func setExceptionHandlingMask(_ aMask: Int)
    func exceptionHandlingMask() -> Int
    func setExceptionHangingMask(_ aMask: Int)
    func exceptionHangingMask() -> Int
    func setDelegate(_ anObject: Any!)
    func delegate() -> Any!
    func exceptionHandler(_ sender: NSExceptionHandler!, shouldLogException exception: NSException!, mask aMask: Int) -> Bool
    func exceptionHandler(_ sender: NSExceptionHandler!, shouldHandle exception: NSException!, mask aMask: Int) -> Bool
    func scriptingIsEqual(to object: Any) -> Bool
    func scriptingIsLessThanOrEqual(to object: Any) -> Bool
    func scriptingIsLessThan(_ object: Any) -> Bool
    func scriptingIsGreaterThanOrEqual(to object: Any) -> Bool
    func scriptingIsGreaterThan(_ object: Any) -> Bool
    func scriptingBegins(with object: Any) -> Bool
    func scriptingEnds(with object: Any) -> Bool
    func scriptingContains(_ object: Any) -> Bool
    func isEqual(to object: Any?) -> Bool
    func isLessThanOrEqual(to object: Any?) -> Bool
    func isLessThan(_ object: Any?) -> Bool
    func isGreaterThanOrEqual(to object: Any?) -> Bool
    func isGreaterThan(_ object: Any?) -> Bool
    func isNotEqual(to object: Any?) -> Bool
    func doesContain(_ object: Any) -> Bool
    func isLike(_ object: String) -> Bool
    func isCaseInsensitiveLike(_ object: String) -> Bool
    var objectSpecifier: NSScriptObjectSpecifier? { get }
    func indicesOfObjects(byEvaluatingObjectSpecifier specifier: NSScriptObjectSpecifier) -> [NSNumber]?
    func value(at index: Int, inPropertyWithKey key: String) -> Any?
    func value(withName name: String, inPropertyWithKey key: String) -> Any?
    func value(withUniqueID uniqueID: Any, inPropertyWithKey key: String) -> Any?
    func insertValue(_ value: Any, at index: Int, inPropertyWithKey key: String)
    func removeValue(at index: Int, fromPropertyWithKey key: String)
    func replaceValue(at index: Int, inPropertyWithKey key: String, withValue value: Any)
    func insertValue(_ value: Any, inPropertyWithKey key: String)
    func coerceValue(_ value: Any?, forKey key: String) -> Any?
    var classCode: FourCharCode { get }
    var className: String { get }
    func scriptingValue(for objectSpecifier: NSScriptObjectSpecifier) -> Any?
    var scriptingProperties: [String : Any]?
    func copyScriptingValue(_ value: Any, forKey key: String, withProperties properties: [String : Any]) -> Any?
    func newScriptingObject(of objectClass: AnyClass, forValueForKey key: String, withContentsValue contentsValue: Any?, properties properties: [String : Any]) -> Any?
    @NSCopying var classDescription: NSClassDescription { get }
    var attributeKeys: [String] { get }
    var toOneRelationshipKeys: [String] { get }
    var toManyRelationshipKeys: [String] { get }
    func inverse(forRelationshipKey relationshipKey: String) -> String?
    var classForPortCoder: AnyClass { get }
    func replacementObject(for coder: NSPortCoder) -> Any?
    var classForArchiver: AnyClass? { get }
    func replacementObject(for archiver: NSArchiver) -> Any?
    func performSelector(onMainThread aSelector: Selector, with arg: Any?, waitUntilDone wait: Bool, modes array: [String]?)
    func performSelector(onMainThread aSelector: Selector, with arg: Any?, waitUntilDone wait: Bool)
    func perform(_ aSelector: Selector, on thr: Thread, with arg: Any?, waitUntilDone wait: Bool, modes array: [String]?)
    func perform(_ aSelector: Selector, on thr: Thread, with arg: Any?, waitUntilDone wait: Bool)
    func performSelector(inBackground aSelector: Selector, with arg: Any?)
    class func classForKeyedUnarchiver() -> AnyClass
    var classForKeyedArchiver: AnyClass? { get }
    func replacementObject(for archiver: NSKeyedArchiver) -> Any?
    class func classFallbacksForKeyedArchiver() -> [String]
    class func setKeys(_ keys: [Any], triggerChangeNotificationsForDependentKey dependentKey: String)
    class func keyPathsForValuesAffectingValue(forKey key: String) -> Set<String>
    class func automaticallyNotifiesObservers(forKey key: String) -> Bool
    var observationInfo: UnsafeMutableRawPointer?
    func willChangeValue(forKey key: String)
    func didChangeValue(forKey key: String)
    func willChange(_ changeKind: NSKeyValueChange, valuesAt indexes: IndexSet, forKey key: String)
    func didChange(_ changeKind: NSKeyValueChange, valuesAt indexes: IndexSet, forKey key: String)
    func willChangeValue(forKey key: String, withSetMutation mutationKind: NSKeyValueSetMutationKind, using objects: Set<AnyHashable>)
    func didChangeValue(forKey key: String, withSetMutation mutationKind: NSKeyValueSetMutationKind, using objects: Set<AnyHashable>)
    func addObserver(_ observer: NSObject, forKeyPath keyPath: String, options options: NSKeyValueObservingOptions = [], context context: UnsafeMutableRawPointer?)
    func removeObserver(_ observer: NSObject, forKeyPath keyPath: String, context context: UnsafeMutableRawPointer?)
    func removeObserver(_ observer: NSObject, forKeyPath keyPath: String)
    func observeValue(forKeyPath keyPath: String?, of object: Any?, change change: [NSKeyValueChangeKey : Any]?, context context: UnsafeMutableRawPointer?)
    class func useStoredAccessor() -> Bool
    func storedValue(forKey key: String) -> Any?
    func takeStoredValue(_ value: Any?, forKey key: String)
    func takeValue(_ value: Any?, forKey key: String)
    func takeValue(_ value: Any?, forKeyPath keyPath: String)
    func handleQuery(withUnboundKey key: String) -> Any?
    func handleTakeValue(_ value: Any?, forUnboundKey key: String)
    func unableToSetNil(forKey key: String)
    func values(forKeys keys: [Any]) -> [AnyHashable : Any]
    func takeValues(from properties: [AnyHashable : Any])
    class var accessInstanceVariablesDirectly: Bool { get }
    func value(forKey key: String) -> Any?
    func setValue(_ value: Any?, forKey key: String)
    func validateValue(_ ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, forKey inKey: String) throws
    func mutableArrayValue(forKey key: String) -> NSMutableArray
    func mutableOrderedSetValue(forKey key: String) -> NSMutableOrderedSet
    func mutableSetValue(forKey key: String) -> NSMutableSet
    func value(forKeyPath keyPath: String) -> Any?
    func setValue(_ value: Any?, forKeyPath keyPath: String)
    func validateValue(_ ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, forKeyPath inKeyPath: String) throws
    func mutableArrayValue(forKeyPath keyPath: String) -> NSMutableArray
    func mutableOrderedSetValue(forKeyPath keyPath: String) -> NSMutableOrderedSet
    func mutableSetValue(forKeyPath keyPath: String) -> NSMutableSet
    func value(forUndefinedKey key: String) -> Any?
    func setValue(_ value: Any?, forUndefinedKey key: String)
    func setNilValueForKey(_ key: String)
    func dictionaryWithValues(forKeys keys: [String]) -> [String : Any]
    func setValuesForKeys(_ keyedValues: [String : Any])
    func fileManager(_ fm: FileManager, shouldProceedAfterError errorInfo: [AnyHashable : Any]) -> Bool
    func fileManager(_ fm: FileManager, willProcessPath path: String)
    func perform(_ aSelector: Selector, with anArgument: Any?, afterDelay delay: TimeInterval, inModes modes: [RunLoopMode])
    func perform(_ aSelector: Selector, with anArgument: Any?, afterDelay delay: TimeInterval)
    class func cancelPreviousPerformRequests(withTarget aTarget: Any, selector aSelector: Selector, object anArgument: Any?)
    class func cancelPreviousPerformRequests(withTarget aTarget: Any)
    func attemptRecovery(fromError error: Error, optionIndex recoveryOptionIndex: Int, delegate delegate: Any?, didRecoverSelector didRecoverSelector: Selector?, contextInfo contextInfo: UnsafeMutableRawPointer?)
    func attemptRecovery(fromError error: Error, optionIndex recoveryOptionIndex: Int) -> Bool
    var autoContentAccessingProxy: Any { get }
    class func pose(as aClass: AnyClass)
    class func version() -> Int
    class func setVersion(_ aVersion: Int)
    var classForCoder: AnyClass { get }
    func replacementObject(for aCoder: NSCoder) -> Any?
    func awakeAfter(using aDecoder: NSCoder) -> Any?
}
extension NSExceptionHandler : CVarArg {
}
extension NSExceptionHandler : Equatable, Hashable {
    var hashValue: Int { get }
}
CVarArg, Equatable, Hashable

Declaration
From
class func defaultExceptionHandler() -> NSExceptionHandler!
To
class func `default`() -> NSExceptionHandler!

Declaration
From
func delegate() -> AnyObject!
To
func delegate() -> Any!

Declaration
From
func setDelegate(_ anObject: AnyObject!)
To
func setDelegate(_ anObject: Any!)

Declaration
From
func exceptionHandler(_ sender: NSExceptionHandler!, shouldHandleException exception: NSException!, mask aMask: Int) -> Bool
To
func exceptionHandler(_ sender: NSExceptionHandler!, shouldHandle exception: NSException!, mask aMask: Int) -> Bool