Fresh Swift
  • About
  • Tags
Fresh Swift

#Error


Open Sourcing Validated

The point free team are open sourcing a new Swift library for handling errors. Validated allows us to accumulate errors into a single type, useful for when we want to know all the reasons why something went wrong.

Posted on August 28, 2018

#opensource  #error 

Total programming in Swift

André Videla describes what a total program is, and examines Swift in this context. André shows us how Swift uses its type system to encourage totality - code that won’t crash or get stuck in an infinite loop.

Posted on December 7, 2017

#totality  #optional  #error 

Moving Safety into Types

Joshua Emmons demonstrates how we can use the Swift type checker to better handle thrown errors. This is a really nice approach to isolation error handling to the point of creation, rather than the point of use.

Posted on November 1, 2017

#throws  #error 

Xcode 9.1 Improves Display of Fatal Errors

Xcode 9.1 significantly improves it’s user feedback when a Swift program terminates due to fatal error. Prior to Xcode 9.1, when a program terminated due to fatal error, the user was often left confused by the non-descriptive error message displayed. With the latest beta, Xcode will now display the reason for the fatal error termination. A nice improvement.

Posted on October 9, 2017

#Xcode  #error 

Swift Error Handling Implementation

Mike Ash with another entry in his great Friday Q&A series. In this post, Mike looks at how Swift error handling works on the inside. He looks at error handling in both Swift 3 and Swift 4, and then compares Swift error handling to exception handling in other languages. Very interesting.

Posted on September 19, 2017

#error 

Matching NSErrors

Joshua Emmons shows us how to easily pattern match NSErrors in Swift. It transpires that since Swift 3, NSErrors are bridged to Swift error structs, and when combined with the pattern matching operator (~=), this allows us to deal with NSErrors in a much more declarative way.

Posted on August 2, 2017

#error 

Errors On The Server

Soroush Khanlou looks at how to best handle errors when writing server-side Swift, in this case Vapor. I really like his point about making the correct way to write code the same as the nice way the write code, therefore removing the need for trade-offs between the two.

Posted on July 9, 2017

#serverside  #vapor  #error 

 •  2019  •  Fresh Swift

Hugo v0.20.7 powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo