IOS-1540 Back out 2b64ca6005e4: Back out: Making errorAndCrash accept pure error. IOS-1540_GOOD
authorDirk Zimmermann <dz@pep.security>
Tue, 11 Jun 2019 16:28:31 +0200
branchIOS-1540_GOOD
changeset 90070c30b7fe3132
parent 9006 014ffda9201e
child 9008 eedfcc5d3fab
IOS-1540 Back out 2b64ca6005e4: Back out: Making errorAndCrash accept pure error.
Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/Logger.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 @@ -170,6 +170,15 @@
     1.4          SystemUtils.crash(msgString)
     1.5      }
     1.6  
     1.7 +    public func errorAndCrash(function: String = #function,
     1.8 +                              filePath: String = #file,
     1.9 +                              fileLine: Int = #line,
    1.10 +                              _ error: Error) {
    1.11 +        let msgString = "\(error)"
    1.12 +        os_log("%{public}@ %{public}@ (%{public}@):%d", msgString, function, filePath, fileLine)
    1.13 +        SystemUtils.crash(msgString)
    1.14 +    }
    1.15 +
    1.16      /**
    1.17       Logs an error.
    1.18       */