static void Main(string[] args) { System.Diagnostics.Trace.Listeners.Add(new TextWriterTraceListener(Console.Out)); FirstMethod(); SecondMethod(); Console.WriteLine("\nPress any key to continue with BizMsgAspect"); Console.ReadKey(); var someObj = new SomeObject(314, "pi"); ThirdMethod(123, someObj); // Console.WriteLine("\nPress any key to exit"); // Console.ReadKey(); }
static void ThirdMethod(int someInt, SomeObject someObj) { Thread.Sleep(1000); throw new Exception("Test Exception Msg."); }