IronRuby.Runtime.RubyExceptions.CreateLoadError C# (CSharp) Method

CreateLoadError() public static method

public static CreateLoadError ( Exception innerException ) : Exception
innerException System.Exception
return System.Exception
        public static Exception/*!*/ CreateLoadError(Exception/*!*/ innerException) {
            return new LoadError(innerException.Message, innerException);
        }

Same methods

RubyExceptions::CreateLoadError ( string message ) : Exception

Usage Example

Example #1
0
        internal Assembly ResolveAssembly(string /*!*/ fullName)
        {
            Utils.Log(String.Format("Resolving assembly: '{0}'", fullName), "RESOLVE_ASSEMBLY");

            AssemblyName assemblyName = new AssemblyName(fullName);
            ResolvedFile file         = FindFile(assemblyName.Name, true, ArrayUtils.EmptyStrings).FirstOrDefault();

            if (file == null || file.SourceUnit != null)
            {
                return(null);
            }

            Utils.Log(String.Format("Assembly '{0}' resolved: found in '{1}'", fullName, file.Path), "RESOLVE_ASSEMBLY");
            try {
                Assembly assembly = Platform.LoadAssemblyFromPath(file.Path);

#if !SILVERLIGHT
                // TODO: this API is broken
                if (AssemblyName.ReferenceMatchesDefinition(assemblyName, assembly.GetName()))
#endif
                {
                    Utils.Log(String.Format("Assembly '{0}' loaded for '{1}'", assembly.FullName, fullName), "RESOLVE_ASSEMBLY");
                    DomainManager.LoadAssembly(assembly);
                    return(assembly);
                }
            } catch (Exception e) {
                throw RubyExceptions.CreateLoadError(e);
            }

#if !SILVERLIGHT
            return(null);
#endif
        }
All Usage Examples Of IronRuby.Runtime.RubyExceptions::CreateLoadError