From 3932996f5d93a8aabf8206df9305526ba350907a Mon Sep 17 00:00:00 2001 From: Lev Date: Fri, 11 Jun 2021 14:17:03 -0500 Subject: [PATCH] Update try catch for enterAsk user input --- .../Topic 4/4.4.7/MerkelMain.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CM2005 Object Oriented Programming/Topic 4/4.4.7/MerkelMain.cpp b/CM2005 Object Oriented Programming/Topic 4/4.4.7/MerkelMain.cpp index 9ecf306..e82d2be 100644 --- a/CM2005 Object Oriented Programming/Topic 4/4.4.7/MerkelMain.cpp +++ b/CM2005 Object Oriented Programming/Topic 4/4.4.7/MerkelMain.cpp @@ -84,7 +84,14 @@ void MerkelMain::enterAsk() } else { - OrderBookEntry obe = CSVReader::stringsToOBE(tokens[1], tokens[2], currentTime, tokens[0], OrderBookType::ask); + try + { + OrderBookEntry obe = CSVReader::stringsToOBE(tokens[1], tokens[2], currentTime, tokens[0], OrderBookType::ask); + } + catch(const std::exception& e) + { + std::cout << "MerkelMain::enterAsk Bad input!" << input << std::endl; + } } std::cout << "You typed: " << input << std::endl; }