public void RunLogic2() { string inputFileName = ""; string outputFileName = ""; try { Console.WriteLine("Enter 'string' type for input file name"); inputFileName = StringParser(); Console.WriteLine("Enter 'string' type for output file name"); outputFileName = StringParser(); Logics.Logic2(inputFileName, outputFileName); } catch (ScubaException ex) { Console.WriteLine($"Sorry, student {ex.studentNumber}, You got a ScubaException: {ex.Message}"); } catch (IOException e) { Console.WriteLine(e.Message.ToString()); } }
public void RunLogic2() { string inFileName, outFileName; try { Console.WriteLine("enter input file name"); TryReadStringParser(out inFileName); Console.WriteLine("enter output file name"); TryReadStringParser(out outFileName); try { Logics.Logic2(inFileName, outFileName); } catch (IOException e) { Console.WriteLine(e.Message.ToString()); } } catch (ScubaException e) { Console.WriteLine(String.Format("Hey {0}, You have an exception as ScubaException : {1}", e.StudentNum, e.Message)); } }