Exemplo n.º 1
0
		public static void CreateNew(Exception exception)
		{
			if (exception == null)
			{
				throw new ArgumentNullException("exception");
			}

			string fullStackTrace = exception.StackTrace;

			// Account for nested exceptions
			Exception innerException = exception.InnerException;
			while (innerException != null)
			{
				fullStackTrace += "\nCaused by: " + exception.Message + "\n\n" + exception.StackTrace;
				innerException = innerException.InnerException;
			}

			ErrorWindow window = new ErrorWindow(exception.Message, fullStackTrace);
			window.Show();
		}
Exemplo n.º 2
0
        public static void CreateNew(Exception exception)
        {
            if (exception == null)
            {
                throw new ArgumentNullException("exception");
            }

            string fullStackTrace = exception.StackTrace;

            // Account for nested exceptions
            Exception innerException = exception.InnerException;

            while (innerException != null)
            {
                fullStackTrace += "\nCaused by: " + exception.Message + "\n\n" + exception.StackTrace;
                innerException  = innerException.InnerException;
            }

            ErrorWindow window = new ErrorWindow(exception.Message, fullStackTrace);

            window.Show();
        }