示例#1
0
        private void InitializeForException(Exception ex)
        {
            // wenn die erste Ausnahme nicht-fatal ist, wird diese aus der Kette genommen
            // und das interne Flag entsprechend gesetzt
            if (ex is NonFatalException)
            {
                this.IsNonFatalException = true;

                // entferne die nicht-fatale Ausnahme aus der Liste, sofern das "RemoveWrapperException" gesetzt ist.
                if (((NonFatalException)ex).RemoveWrapperException)
                {
                    ex = ex.InnerException;
                }
            }

            // aus der Exception-Hierarchie die flache Liste erzeugen
            this.FlatExceptionList = ListFlattener.GetFlatList(ex);
            this.SelectedException = this.FlatExceptionList[0];
        }
示例#2
0
        public static List <Exception> GetFlatList(Exception ex)
        {
            var flattener = new ListFlattener(ex);

            return(flattener.exceptions);
        }