static void Main(string[] args) { try { client.Start(args); } catch (AggregateException ex) { foreach (var e in ex.InnerExceptions) { Console.WriteLine("Error: {0}", e.Message); } } catch (Exception ex) { Console.WriteLine("Error: {0}", ex.Message); } finally { Console.WriteLine("Press any key to continue..."); Console.ReadKey(); } }