IOS-1540 Back out bf6b5b50a651: Tighter errorAndCrash. IOS-1540_GOOD
authorDirk Zimmermann <dz@pep.security>
Tue, 11 Jun 2019 16:28:31 +0200
branchIOS-1540_GOOD
changeset 90055c1178ccf99c
parent 9004 eac1ef2be8d0
child 9006 014ffda9201e
IOS-1540 Back out bf6b5b50a651: Tighter errorAndCrash.
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 @@ -164,17 +164,18 @@
     1.4      public func errorAndCrash(function: String = #function,
     1.5                                filePath: String = #file,
     1.6                                fileLine: Int = #line,
     1.7 -                              _ message: StaticString) {
     1.8 +                              _ message: StaticString,
     1.9 +                              _ args: CVarArg...) {
    1.10 +        saveLog(message: message,
    1.11 +                severity: .fault,
    1.12 +                function: function,
    1.13 +                filePath: filePath,
    1.14 +                fileLine: fileLine,
    1.15 +                args: args)
    1.16 +
    1.17          SystemUtils.crash("\(filePath):\(function):\(fileLine) - \(message)")
    1.18      }
    1.19  
    1.20 -    public func errorAndCrash(function: String = #function,
    1.21 -                              filePath: String = #file,
    1.22 -                              fileLine: Int = #line,
    1.23 -                              _ error: Error) {
    1.24 -        SystemUtils.crash("\(filePath):\(function):\(fileLine) - \(error)")
    1.25 -    }
    1.26 -
    1.27      /**
    1.28       Logs an error.
    1.29       */