title: How to create an elegant guard / return statement in Swift that gives output?
body: <p>For example, this works:</p>
  
  <pre><code>guard condition == true else { return }
  </code></pre>
  
  <p>Which is fine, but creates a silent failure. What would be nice is to have a static function that could output feedback whilst also returning. Something like:</p>
  
  <pre><code>guard condition == true else { stop("condition was false") }
  </code></pre>
  
  <p>Am I living in dreamland here, or might this be possible?</p>
  
  <p>Of course, I recognise that the following is possible:</p>
  
  <pre><code>guard condition == true else { 
      print("condition was false")
      return
  }
  </code></pre>
  
  <p>But is boilerplate heavy and kind of ugly. I have guard statements <strong>everywhere</strong>, this sort of code is: 1. useful; but 2. would bulk out my code by, like, 10% minimum.</p>
  
  <p>It's utopian of me I know, but I would prefer an elegant solution. Anyone?</p>