Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftErrorHandlingGuide

Sample code demonstrating A practical guide to Swift error handling covering throw/try/catch fundamentals, custom error types, Result, async error patterns, and typed throws introduced in Swift 6..

This project accompanies the article: Error Handling in Swift: From Basics to Typed Throws

Requirements

  • Xcode 26.2+
  • iOS 26.0+
  • Swift 6.0

Getting Started

  1. Clone this repository
  2. Run xcodegen generate (requires XcodeGen)
  3. Open SwiftErrorHandlingGuide.xcodeproj
  4. Build and run

What's Included

  • App.swift: Source file
  • ContentView.swift: Source file
  • Models.swift: Source file
  • Errors.swift: Source file
  • Validation.swift: Source file
  • Services.swift: Source file
  • ValidationDemoView.swift: Source file
  • ResultDemoView.swift: Source file
  • AsyncDemoView.swift: Source file
  • TypedThrowsDemoView.swift: Source file
  • UserServiceDemoView.swift: Source file

Learn More

Read the full article at BleepingSwift for detailed explanations and additional examples.

License

MIT License - see LICENSE for details.

About

A practical guide to Swift error handling covering throw/try/catch fundamentals, custom error types, Result, async error patterns, and typed throws introduced in Swift 6.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages