Added better error handling to the calculator project.