Guaranteed code execution in Swift

func throwIfTrue(param: Boolthrows {
    do {
        if param {
            throw Exception.text
        }
    }
    catch {
        print("catch")
    }
    defer {
        print("defer")
    }
}

trythrowIfTrue(true)
//printed: "catch" and "defer"
trythrowIfTrue(false)
//printed only "defer"