Ejemplo n.º 1
0
		private static void EventSink_LogException(LogExceptionEventArgs e)
		{	// exception passed up from the server core
			try { LogException(e.Exception); }
			catch { Console.WriteLine("Nested exception while processing: {0}", e.Exception.Message); }	// do not call LogException
		}
Ejemplo n.º 2
0
		public static void InvokeLogException(LogExceptionEventArgs e)
		{
			if (LogException != null)
			{
				foreach (LogExceptionEventHandler currentDelegate in LogException.GetInvocationList())
				{
					try
					{
						currentDelegate.Invoke(e);
					}
					catch (Exception ex)
					{
						//Do nothing to avoid recursion
						Console.WriteLine(ex.Message);
					}
				}
			}
		}