Fail() public méthode

public Fail ( Exception exception, string details ) : void
exception System.Exception
details string
Résultat void
        protected void StartupPlugin(IPlugin plugin)
        {
            // See if the plugin already exists - it may implement multiple interfaces
            if (!mPluginContainers.ContainsKey(plugin))
            {
                PluginContainer pluginContainer = new PluginContainer(plugin);
                mPluginContainers.Add(plugin, pluginContainer);

                try
                {
                    plugin.StartUp();
                }
                catch (Exception e)
                {
                    pluginContainer.Fail(e, "Plugin failed in StartUp");
                }
            }
        }
        protected void StartupPlugin(IPlugin plugin)
        {
            // See if the plugin already exists - it may implement multiple interfaces
            if (!mPluginContainers.ContainsKey(plugin))
            {
                PluginContainer pluginContainer = new PluginContainer(plugin);
                mPluginContainers.Add(plugin, pluginContainer);

                try
                {
                    plugin.StartUp();
                }
                catch (Exception e)
                {
                    pluginContainer.Fail(e, "Plugin failed in StartUp");
                }
            }
        }
 private static void PluginCommandWithThrow(Action action, PluginContainer container, string message)
 {
     if (HandleExceptions)
     {
         try
         {
             action();
         }
         catch (Exception e)
         {
             container.Fail(e, message);
             throw;
         }
     }
     else
     {
         action();
     }
 }
        private static void PluginCommand(Action action, PluginContainer container, string message)
        {
            if (HandleExceptions)
            {
                if (mMenuStrip.IsDisposed)
                {
                    try
                    {
                        action();
                    }
                    catch (Exception e)
                    {
                        container.Fail(e, message);

                        ReceiveError(message + "\n" + e.ToString());


                    }
                }
                else
                {
                    if (mMenuStrip.IsDisposed == false)
                    {
                        // Do this on a UI thread
                        mMenuStrip.Invoke((MethodInvoker)delegate
                        {
                            try
                            {
                                action();
                            }
                            catch (Exception e)
                            {
                                container.Fail(e, message);

                                ReceiveError(message + "\n" + e.ToString());


                            }
                        });
                    }
                    else
                    {
                        try
                        {
                            action();
                        }
                        catch (Exception e)
                        {
                            container.Fail(e, message);

                            ReceiveError(message + "\n" + e.ToString());


                        }
                    }
                }
            }
            else
            {
                action();
            }
        }
        private static void PluginCommandNotUiThread(Action action, PluginContainer container, string message)
        {
            if (HandleExceptions)
            {
                try
                {
                    action();
                }
                catch (Exception e)
                {
                    container.Fail(e, message);

                    ReceiveError(message + "\n" + e.ToString());
                }
            }
            else
            {
                action();
            }
        }