Example #1
0
        internal Exception GetClasslibException(ExceptionIDs id)
        {
#if INPLACE_RUNTIME
            return(RuntimeExceptionHelpers.GetRuntimeException(id));
#else
            return(EH.GetClasslibException(id, GetAssociatedModuleAddress()));
#endif
        }
Example #2
0
        internal Exception GetClasslibException(ExceptionIDs id)
        {
#if INPLACE_RUNTIME
            return(RuntimeExceptionHelpers.GetRuntimeException(id));
#else
            DynamicModule *dynamicModule = this.DynamicModule;
            if (dynamicModule != null)
            {
                IntPtr getRuntimeException = dynamicModule->GetRuntimeException;
                if (getRuntimeException != IntPtr.Zero)
                {
                    return(CalliIntrinsics.Call <Exception>(getRuntimeException, id));
                }
            }
            if (IsParameterizedType)
            {
                return(RelatedParameterType->GetClasslibException(id));
            }

            return(EH.GetClasslibException(id, GetAssociatedModuleAddress()));
#endif
        }