accept user input, throw and catch exceptions