提交 b11e90f2 编写于 作者: M Miguel de Icaza 提交者: GitHub

Improve error messages to help users diagnose problems when using custom mode (#4922)

* Improve error messages to help users diagnose problems when using the custom mode

* Update mkbundle.cs
上级 fe1c006f
......@@ -1110,6 +1110,14 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
}
if (error != null) {
Console.Error.WriteLine ("Failure to load i18n assemblies, the following directories were searched for the assemblies:");
foreach (var path in link_paths){
Console.Error.WriteLine (" Path: " + path);
}
if (custom_mode){
Console.WriteLine ("In Custom mode, you need to provide the directory to lookup assemblies from using -L");
}
Error ("Couldn't load one or more of the i18n assemblies: " + error);
Environment.Exit (1);
}
......@@ -1183,7 +1191,12 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
Assembly a = null;
try {
if (!quiet)
Console.WriteLine ("Attempting to load assembly: {0}", assembly);
a = universe.LoadFile (assembly);
if (!quiet)
Console.WriteLine ("Assembly {0} loaded successfully.", assembly);
} catch (FileNotFoundException){
Error ($"Cannot find assembly `{assembly}'");
} catch (IKVM.Reflection.BadImageFormatException f) {
......@@ -1206,6 +1219,8 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
string total_log = "";
foreach (string dir in link_paths){
string full_path = Path.Combine (dir, assembly);
if (!quiet)
Console.WriteLine ("Attempting to load assembly from: " + full_path);
if (!assembly.EndsWith (".dll") && !assembly.EndsWith (".exe"))
full_path += ".dll";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册