diff options
author | Joe George <joe@zeroc.com> | 2019-06-07 14:44:05 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2019-06-11 15:30:33 -0400 |
commit | 98a176e8347a74743f12aa3079c043f3200e7a75 (patch) | |
tree | 4d50341fdcd22369c97376c39fc6373b17ed55b7 | |
parent | Add Jazzy config (diff) | |
download | ice-98a176e8347a74743f12aa3079c043f3200e7a75.tar.bz2 ice-98a176e8347a74743f12aa3079c043f3200e7a75.tar.xz ice-98a176e8347a74743f12aa3079c043f3200e7a75.zip |
Replace precondition(false) with fatalError
-rw-r--r-- | swift/src/Ice/ClassResolver.swift | 4 | ||||
-rw-r--r-- | swift/src/Ice/Proxy.swift | 6 | ||||
-rw-r--r-- | swift/src/Ice/Value.swift | 3 |
3 files changed, 6 insertions, 7 deletions
diff --git a/swift/src/Ice/ClassResolver.swift b/swift/src/Ice/ClassResolver.swift index 81e487f54df..40223d5bb71 100644 --- a/swift/src/Ice/ClassResolver.swift +++ b/swift/src/Ice/ClassResolver.swift @@ -6,14 +6,14 @@ import Foundation open class ValueTypeResolver: NSObject { open func type() -> Value.Type { - precondition(false, "Abstract method") + fatalError("Abstract method") return Value.self } } open class UserExceptionTypeResolver: NSObject { open func type() -> UserException.Type { - precondition(false, "Abstract method") + fatalError("Abstract method") return UserException.self } } diff --git a/swift/src/Ice/Proxy.swift b/swift/src/Ice/Proxy.swift index 11cdf8db276..204bbaca799 100644 --- a/swift/src/Ice/Proxy.swift +++ b/swift/src/Ice/Proxy.swift @@ -653,7 +653,7 @@ public extension ObjectPrx { inParams: inEncaps, context: context, response: { _, _ in - precondition(false) + fatalError("Unexpected response") }, exception: { error in seal.reject(error) @@ -1315,7 +1315,7 @@ open class ObjectPrxI: ObjectPrx { inParams: ostr.finished(), context: context, response: { _, _ in - precondition(false) + fatalError("Unexpected response") }, exception: { error in seal.reject(error) @@ -1390,7 +1390,7 @@ open class ObjectPrxI: ObjectPrx { } throw UnknownUserException(unknown: error.ice_id()) } - precondition(false) + fatalError("Failed to throw user exception") } public static func checkedCast<ProxyImpl>(prx: ObjectPrx, diff --git a/swift/src/Ice/Value.swift b/swift/src/Ice/Value.swift index 67634de67b1..554105ad988 100644 --- a/swift/src/Ice/Value.swift +++ b/swift/src/Ice/Value.swift @@ -60,8 +60,7 @@ open class InterfaceByValue: Value { private var id: String public required init() { - precondition(false, "Not supported") - id = "" + fatalError("Not supported") } public init(id: String) { |