From b34950be781ded908bc2c1ec81ddfb7247486c41 Mon Sep 17 00:00:00 2001 From: Nicholas Rishel Date: Fri, 31 Mar 2023 17:30:15 +0000 Subject: [PATCH] Bug 1822817 - Post: Log when Windows native notifications fail. r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D173497 --- widget/windows/ToastNotificationHandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/widget/windows/ToastNotificationHandler.cpp b/widget/windows/ToastNotificationHandler.cpp index 35a9a11bff33..ed46cc9ff75b 100644 --- a/widget/windows/ToastNotificationHandler.cpp +++ b/widget/windows/ToastNotificationHandler.cpp @@ -994,6 +994,11 @@ ToastNotificationHandler::OnDismiss( HRESULT ToastNotificationHandler::OnFail(const ComPtr& notification, const ComPtr& aArgs) { + HRESULT err; + aArgs->get_ErrorCode(&err); + MOZ_LOG(sWASLog, LogLevel::Error, + ("Error creating notification, error: %ld", err)); + SendFinished(); mBackend->RemoveHandler(mName, this); return S_OK;