Пример #1
0
        private bool IsCatchpoint(CorException2EventArgs e)
        {
            // Build up the exception type hierachy
            CorValue      v          = e.Thread.CurrentException;
            List <string> exceptions = new List <string>();
            CorType       t          = v.ExactType;

            while (t != null)
            {
                exceptions.Add(t.GetTypeInfo(this).FullName);
                t = t.Base;
            }

            // See if a catchpoint is set for this exception.
            foreach (Catchpoint cp in Breakpoints.GetCatchpoints())
            {
                if (cp.Enabled && exceptions.Contains(cp.ExceptionName))
                {
                    return(true);
                }
            }

            return(false);
        }