Пример #1
0
        public ExceptionInfo(Exception exception)
        {
            if (exception == null)
                throw new ArgumentNullException("exception");

            if (exception.InnerException != null)
                InnerException = new ExceptionInfo(exception.InnerException);
            Message = FixupErrorMessage(exception.Message);
            StackTrace = exception.StackTrace;
            FullMessage = FixupErrorMessage(exception.ToString());
        }
Пример #2
0
            protected override void Before_all_tests()
            {
                base.Before_all_tests();

                try
                {
                    Exception innerEx;
                    try
                    {
                        throw new Exception("Inner ex!");
                    }
                    catch (Exception i)
                    {
                        innerEx = i;
                    }

                    throw new Exception("Test message!", innerEx);
                }
                catch (Exception e)
                {
                    _exception = e;
                    _exceptionInfo = new ExceptionInfo(e);
                }
            }