IKVM.Internal.MethodWrapper.GetExceptions C# (CSharp) Method

GetExceptions() private method

private GetExceptions ( ) : java.lang.Class[]
return java.lang.Class[]
        private java.lang.Class[] GetExceptions()
        {
            string[] classes = declaredExceptions;
            Type[] types = Type.EmptyTypes;
            if (classes == null)
            {
            #if !NOEMIT
                // NOTE if method is a MethodBuilder, GetCustomAttributes doesn't work (and if
                // the method had any declared exceptions, the declaredExceptions field would have
                // been set)
                if (method != null && !(method is MethodBuilder))
                {
                    ThrowsAttribute attr = AttributeHelper.GetThrows(method);
                    if (attr != null)
                    {
                        classes = attr.classes;
                        types = attr.types;
                    }
                }
            #endif
            }
            if (classes != null)
            {
                java.lang.Class[] array = new java.lang.Class[classes.Length];
                for (int i = 0; i < classes.Length; i++)
                {
                    array[i] = this.DeclaringType.GetClassLoader().LoadClassByDottedName(classes[i]).ClassObject;
                }
                return array;
            }
            else
            {
                java.lang.Class[] array = new java.lang.Class[types.Length];
                for (int i = 0; i < types.Length; i++)
                {
                    array[i] = types[i];
                }
                return array;
            }
        }