public static int Main(String [] args) { int retVal = 100; String s = "Done"; Thread mv_Thread; MultipleException [] me = new MultipleException[10]; for (int i = 0 ; i < 10; i++){ me[i] = new MultipleException(i); mv_Thread = new Thread(new ThreadStart(me[i].runtest)); try { mv_Thread.Start(); } catch (Exception ){ Console.WriteLine("Exception was caught in main"); retVal = 0; } } Console.WriteLine(s); return retVal; }
public static int Main(String [] args) { int retVal = 100; String s = "Done"; Thread mv_Thread; MultipleException [] me = new MultipleException[10]; for (int i = 0; i < 10; i++) { me[i] = new MultipleException(i); mv_Thread = new Thread(new ThreadStart(me[i].runtest)); try { mv_Thread.Start(); } catch (Exception) { Console.WriteLine("Exception was caught in main"); retVal = 0; } } Console.WriteLine(s); return(retVal); }
public void Report() { lock (UIExceptionReporter.SyncRoot) { if (_exceptions.Count > 0) { Exception finalException; if (_exceptions.Count == 1) { finalException = _exceptions.First().Item1; } else { finalException = new MultipleException(_exceptions.Select(e => e.Item1)); } problemReporter.Report( string.IsNullOrEmpty(this.SubjectText.Value) ? this.Title : this.SubjectText.Value, this.AdditionalText.Value, _exceptions.First().Item2, finalException); Clear(); } } this.Show = false; }