RickStrahl / MarkdownMonster

An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
https://markdownmonster.west-wind.com
Other
1.59k stars 235 forks source link

Error dialog fails to pop up when posting a blog entry fails #824

Closed joemclain closed 3 years ago

joemclain commented 3 years ago

Error dialog fails to pop up when posting a blog entry fails

In:

WeblogAddin.cs ~ line 260

    if (!result)
    {
        mmApp.Log($"Error sending post to Weblog at {weblogInfo.ApiUrl}: " + client.ErrorMessage);
        MessageBox.Show(WeblogForm, "Error sending post to Weblog: " + client.ErrorMessage,
            mmApp.ApplicationName,
            MessageBoxButton.OK,
            MessageBoxImage.Exclamation);
            return false;
        }

The MessageBox WeblogForm parameter is null. The MessageBox call throws an exception which is caught in WebLogForm.xaml.cs where a status message error message is posted.

The WebglogForm instance should be set in WeblogAddin.cs ~ line 109. The containing method OnExecute() is never called.

Or so it goes on my machine, MM 2.0.3, running under debug.

-joe mclain-

joemclain commented 3 years ago

On further checking I find that OnExecute() is called when Weblog is selected from the Addins menu, but not when any of the Weblog menu items are selected.

RickStrahl commented 3 years ago

This was fixed some time ago. IT doesn't show error info unfortunately because the XmlRpc library unfortunately doesn't surface the full error information 😢

joemclain commented 3 years ago

Um ... As of the source I pulled down an hour ago (6:30 pm PST, 3 Aug 21)

I dropped a few breakpoints and watched this happen when I attempted to post to a blog that I knew would fail.

If this doesn't make sense tell me and I'll try to phrase this better.

-joe mclain-