title: How should I handle parameter validation Swift
body: <p>I am learning Swift. I am designing a class that needs to do parameter validation in it's initializer. How should I handle this if the value passed falls out of range ? I am really finding it difficult to find an appropiate way to design this, considering that:</p>
  
  <ul>
  <li>Swift does not have exceptions, in languages with exceptions and built-in try/catch mechanism, I would have thrown an exception.</li>
  <li>Swift does not allow returning nil / null / nothing from the initializer to indicate an error condition, like we can do in Objective-C.</li>
  <li>I feel passing an NSErrorPointer to an initializer is cumbersome and places an unneccessary burden on the consumer of the class.</li>
  </ul>
  
  <p>How would you validate a parameter for an initializer in Swift ? </p>