Is it possible to catch exceptions in Swift? Given the following code:
NSException.raise(NSRangeException, format: "Now you've gone too far!", arguments: CVaListPointer(fromUnsafePointer: UnsafePointer()))
Is it possible to prevent exclusion from an entire program? That is, which is equivalent to Swift from the following in Objective-C:
@try { [NSException raise:NSRangeException format:@"Now you've gone too far!"]; }
exception try-catch swift
modocache Jun 03 '14 at 19:12 2014-06-03 19:12
source share