Changes

Understanding Error Handling in Swift 2

12 bytes removed, 20:34, 1 February 2016
m
Text replacement - "<google>BUY_IOS9</google>" to "<htmlet>ios9</htmlet>"
<googlehtmlet>BUY_IOS9ios9</googlehtmlet>
}
</pre>
<googlehtmlet>BUY_IOS9ios9</googlehtmlet>
Once a method has been declared as being able to throw errors, code can then be added to throw the errors when they are encountered. This is achieved using the throw statement in conjunction with the guard statement. The following code declares some constants to serve as status values and then implements the guard and throw behavior for the method:
<googlehtmlet>BUY_IOS9ios9</googlehtmlet>