using System;
using System.Threading;
public class Program
{
public static void Main()
var thread = new Thread(() =>
throw new Exception("This is a test");
Console.WriteLine("Hello World");
}
);
try
thread.Start();
catch (Exception e)
Console.WriteLine("Caught: " + e.Message);