How to make the exception send the message after inputting data? C#
I want to make the program send the excpetion message after inputting data. Now when I for example trigger the excpetion after just writing the inputs for x it send the message iimmediately. Can someone help? static void Main(string[] args) { int x; int y; int z; int suma; try { x = Convert.ToInt32(Console.ReadLine()); y = Convert.ToInt32(Console.ReadLine()); z = Convert.ToInt32(Console.ReadLine()); suma = x + y + z; Console.WriteLine(suma); } catch (FormatException) { Console.WriteLine("format exception, exit"); } catch (ArgumentException) { Console.WriteLine("argument exception, exit"); } catch (OverflowException) { Console.WriteLine("overflow exception, exit"); } catch { Console.WriteLine("non supported exception, exit"); } }