From f50624023a8d45ceabd2c386fcdb4c3bd84a2e57 Mon Sep 17 00:00:00 2001 From: redlineo Date: Fri, 24 Jul 2026 10:19:09 +0300 Subject: [PATCH] Show full exception detail in error dialogs instead of just Message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An operator hit "Значение не может быть неопределенным. Имя параметра: source" (ArgumentNullException, ParamName=source) opening the bulk sender window on a real Outlook install. A full read-through of every LINQ call reachable from that path found nothing that could receive a null source, and this dev machine has no Outlook to reproduce against - so the next occurrence needs a real stack trace to diagnose instead of guessing from ex.Message alone. Co-Authored-By: Claude Sonnet 5 --- .../BulkArchiveMailer.AddIn/RibbonController.cs | 2 +- outlook-bulk-sender/BulkArchiveMailer.AddIn/UI/PreviewForm.cs | 2 +- .../BulkArchiveMailer.AddIn/UI/SettingsForm.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/outlook-bulk-sender/BulkArchiveMailer.AddIn/RibbonController.cs b/outlook-bulk-sender/BulkArchiveMailer.AddIn/RibbonController.cs index 8cfdc4b..0ece507 100644 --- a/outlook-bulk-sender/BulkArchiveMailer.AddIn/RibbonController.cs +++ b/outlook-bulk-sender/BulkArchiveMailer.AddIn/RibbonController.cs @@ -60,7 +60,7 @@ namespace BulkArchiveMailer.AddIn catch (Exception ex) { MessageBox.Show( - "Не удалось открыть окно массовой рассылки: " + ex.Message, + "Не удалось открыть окно массовой рассылки: " + ex.ToString(), "BulkArchiveMailer", MessageBoxButtons.OK, MessageBoxIcon.Error); diff --git a/outlook-bulk-sender/BulkArchiveMailer.AddIn/UI/PreviewForm.cs b/outlook-bulk-sender/BulkArchiveMailer.AddIn/UI/PreviewForm.cs index 6d73090..c4a8994 100644 --- a/outlook-bulk-sender/BulkArchiveMailer.AddIn/UI/PreviewForm.cs +++ b/outlook-bulk-sender/BulkArchiveMailer.AddIn/UI/PreviewForm.cs @@ -39,7 +39,7 @@ namespace BulkArchiveMailer.AddIn.UI } catch (Exception ex) { - MessageBox.Show(this, "Не удалось прочитать настройки: " + ex.Message, "BulkArchiveMailer", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show(this, "Не удалось прочитать настройки: " + ex.ToString(), "BulkArchiveMailer", MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); return; } diff --git a/outlook-bulk-sender/BulkArchiveMailer.AddIn/UI/SettingsForm.cs b/outlook-bulk-sender/BulkArchiveMailer.AddIn/UI/SettingsForm.cs index 1d65e19..bfedfde 100644 --- a/outlook-bulk-sender/BulkArchiveMailer.AddIn/UI/SettingsForm.cs +++ b/outlook-bulk-sender/BulkArchiveMailer.AddIn/UI/SettingsForm.cs @@ -31,7 +31,7 @@ namespace BulkArchiveMailer.AddIn.UI catch (Exception ex) { MessageBox.Show( - "Не удалось прочитать config.json (" + AppSettings.ConfigFilePath + "):\n" + ex.Message + + "Не удалось прочитать config.json (" + AppSettings.ConfigFilePath + "):\n" + ex.ToString() + "\n\nБудут показаны пустые настройки — сохранение перезапишет файл заново.", "BulkArchiveMailer", MessageBoxButtons.OK, @@ -231,7 +231,7 @@ namespace BulkArchiveMailer.AddIn.UI } catch (Exception ex) { - MessageBox.Show(this, "Не удалось сохранить настройки: " + ex.Message, "BulkArchiveMailer", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show(this, "Не удалось сохранить настройки: " + ex.ToString(), "BulkArchiveMailer", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }