title: Swift Error handling best practices
body: <p>Im used to typical try catch blocks to handle exceptions of any function or block of code like objective C.</p>
  
  <p>However, after making leap of faith to Swift and reading about Swift’s error handling; it’s not much what I expected. You must handle your exceptions by throwing errors and guard and checking if else everything.</p>
  
  <p>I need general Swift error handling tips and best practices, and especially for the following cases:</p>
  
  <ol>
  <li><p>Im using Alamofire for calling services, which has closure, and calling it through another function with closure too. AFAIK I can’t throw error inside async code, so what is best practice for such case? <em>will try to update with code sample</em></p></li>
  <li><p>Is it favourable to have every function in the app throw errors? Just in case ? Like checking every single value or result.</p></li>
  <li><p>Can I have a Singleton Error handling module?</p></li>
  </ol>
  
  <p>Thanks in advance </p>