Read chapter Error Handling of The Swift programming language guide. catch is VendingMachineError - is what I have missed before.

Read Popovers, UINavigationController, and preferredContentSize. Relevant topic for current task.