swift force-unwrapping exception not propagated : <p>I've run into this silly behaviour in swift where force-unwrapping an optional does not propagate.</p>

<p>From the documentation:</p>

<blockquote>
  <p>Trying to use ! to access a non-existent optional value triggers a runtime error. Always make sure that an optional contains a non-nil value before using ! to force-unwrap its value.</p>
</blockquote>

<p>To reproduce:</p>

<pre><code>func foo(bar:String?) throws{
    print(bar!);
}
</code></pre>

<p>And</p>

<pre><code>try foo(nil);
</code></pre>

<p>This does not seem logical or consistent to me and I can't find any documentation on this subject.</p>

<p>Is this by design?</p>
