Method throwing an exception in Swift

//only the method with the keyword "throws"
//can throw an error
func methodWithException() throws {
    throw Exception.text
}