public FusionException(string message, string fusionLog, Assembly assembly, Type type, MirandaPlugin plugin, Exception inner) : base(message, inner) { this.assembly = assembly; this.pluginType = type; this.instantiatedPlugin = plugin; this.fusionLog = fusionLog; }
public static DefaultExceptionHandler Create(MirandaPlugin plugin) { return new DefaultExceptionHandler(plugin); }
private DefaultExceptionHandler(MirandaPlugin plugin) { this.plugin = plugin; }
public static void BeginPluginUpdate(MirandaPlugin plugin) { VerifyNotNull(plugin); Monitor.Enter(plugin); }
public FusionException(string message, Assembly assembly, Type type, MirandaPlugin plugin, Exception inner) : this(message, TextResources.UI_Label_Empty, assembly, type, plugin, inner) { }
private void LoadAssembly(string path, ref Assembly currentAssembly, ref Type currentType, ref MirandaPlugin currentPlugin) { Log.DebuggerWrite(0, LogCategory, "Loading assembly '" + path + "'..."); try { currentAssembly = Assembly.Load(Path.GetFileNameWithoutExtension(path)); foreach (Type type in GetExposedPlugins(currentAssembly)) LoadPluginFromType(currentType = type); } catch (BadImageFormatException bifE) { throw new FusionException(String.Format(TextResources.ExceptionMsg_Formatable1_UnmanagedImageFound, path), bifE.FusionLog, null, null, null, bifE); } catch (FileNotFoundException fnfE) { throw new FusionException(String.Format(TextResources.ExceptionMsg_Formatable1_AssemblyLoadError, currentAssembly != null ? currentAssembly.ToString() : path), fnfE.FusionLog, currentAssembly, currentType, null, fnfE); } catch (FusionException) { throw; } catch (Exception e) { throw new FusionException(String.Format(TextResources.ExceptionMsg_Formatable1_AssemblyLoadError, path, e.Message), currentAssembly.ToString(), null, null, null, e); } }