Created
November 4, 2016 18:07
-
-
Save bsneed/2ecf3b3fc68bdee6c88a5e34820300e5 to your computer and use it in GitHub Desktop.
Exception failure in swift.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public func exceptionFailure(_ message: String) { | |
let args: [CVarArg] = [] | |
if isInUnitTest() { | |
NSException.raise(NSExceptionName(rawValue: ELExceptionFailure), format: message, arguments: getVaList(args)) | |
} else { | |
#if DEBUG | |
NSException.raise(NSExceptionName(rawValue: ELExceptionFailure), format: message, arguments: getVaList(args)) | |
#endif | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment