IOS-1540 Back out 09a89a2507a6: Default errorAndCrash is message string, no label. IOS-1540_GOOD
authorDirk Zimmermann <dz@pep.security>
Tue, 11 Jun 2019 16:28:31 +0200
branchIOS-1540_GOOD
changeset 8998ed840535b98a
parent 8997 392eeff6f5ec
child 8999 054ddf403456
IOS-1540 Back out 09a89a2507a6: Default errorAndCrash is message string, no label.
Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/Logger.swift
Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/SortedSet.swift
subModules/pEpIOSToolbox/pEpIOSToolbox/Foundation/String+Extensions.swift
     1.1 --- a/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/Logger.swift	Tue Jun 11 16:28:31 2019 +0200
     1.2 +++ b/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/Logger.swift	Tue Jun 11 16:28:31 2019 +0200
     1.3 @@ -164,7 +164,7 @@
     1.4      public func errorAndCrash(function: String = #function,
     1.5                                filePath: String = #file,
     1.6                                fileLine: Int = #line,
     1.7 -                              _ message: StaticString? = nil) {
     1.8 +                              message: StaticString? = nil) {
     1.9          SystemUtils.crash("\(filePath):\(function):\(fileLine) - \(message ?? "no message")")
    1.10      }
    1.11  
    1.12 @@ -203,7 +203,7 @@
    1.13       own method.
    1.14       */
    1.15      public func lostMySelf() {
    1.16 -        errorAndCrash("Lost MySelf")
    1.17 +        errorAndCrash(message: "Lost MySelf")
    1.18      }
    1.19  
    1.20      private let subsystem: String
     2.1 --- a/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/SortedSet.swift	Tue Jun 11 16:28:31 2019 +0200
     2.2 +++ b/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/SortedSet.swift	Tue Jun 11 16:28:31 2019 +0200
     2.3 @@ -51,7 +51,7 @@
     2.4          defer { objc_sync_exit(self) }
     2.5  
     2.6          guard isValidIndex(index) else {
     2.7 -            Log.shared.errorAndCrash("Index out of range")
     2.8 +            Log.shared.errorAndCrash(message: "Index out of range")
     2.9              return
    2.10          }
    2.11          set.removeObject(at: index)
    2.12 @@ -62,7 +62,7 @@
    2.13          defer { objc_sync_exit(self) }
    2.14  
    2.15          guard isValidIndex(index) else {
    2.16 -            Log.shared.errorAndCrash("Index out of range")
    2.17 +            Log.shared.errorAndCrash(message: "Index out of range")
    2.18              return
    2.19          }
    2.20          set.replaceObject(at: index, with: object)
    2.21 @@ -73,7 +73,7 @@
    2.22          defer { objc_sync_exit(self) }
    2.23  
    2.24          guard isValidIndex(index) else {
    2.25 -            Log.shared.errorAndCrash("Index out of range")
    2.26 +            Log.shared.errorAndCrash(message: "Index out of range")
    2.27              return nil
    2.28          }
    2.29  
    2.30 @@ -101,7 +101,7 @@
    2.31  
    2.32          for i in 0..<set.count {
    2.33              guard let testee = set.object(at: i) as? T else {
    2.34 -                Log.shared.errorAndCrash("error casting")
    2.35 +                Log.shared.errorAndCrash(message: "error casting")
    2.36                  return NSNotFound
    2.37              }
    2.38              if testee == object {
    2.39 @@ -187,7 +187,7 @@
    2.40          set.sort { (first: Any, second: Any) -> ComparisonResult in
    2.41              guard let firstT = first as? T,
    2.42                  let secondT = second as? T else {
    2.43 -                    Log.shared.errorAndCrash("Error casting.")
    2.44 +                    Log.shared.errorAndCrash(message: "Error casting.")
    2.45                      return .orderedSame
    2.46              }
    2.47              return sortBlock(firstT, secondT)
    2.48 @@ -197,7 +197,7 @@
    2.49      private func indexOfObjectIfInserted(obj: T) -> Int {
    2.50          for i in 0..<set.count {
    2.51              guard let testee = set.object(at: i) as? T else {
    2.52 -                Log.shared.errorAndCrash("Error casing")
    2.53 +                Log.shared.errorAndCrash(message: "Error casing")
    2.54                  return 0
    2.55              }
    2.56              if set.count == 0 {
     3.1 --- a/subModules/pEpIOSToolbox/pEpIOSToolbox/Foundation/String+Extensions.swift	Tue Jun 11 16:28:31 2019 +0200
     3.2 +++ b/subModules/pEpIOSToolbox/pEpIOSToolbox/Foundation/String+Extensions.swift	Tue Jun 11 16:28:31 2019 +0200
     3.3 @@ -152,7 +152,7 @@
     3.4                                                      range: range,
     3.5                                                      withTemplate: replacee)
     3.6          } catch {
     3.7 -            Log.shared.errorAndCrash("Caught!")
     3.8 +            Log.shared.errorAndCrash(message: "Caught!")
     3.9              return result
    3.10          }
    3.11          return result