From ff07374e2a43126591328d0f66844b0e9c284bdb Mon Sep 17 00:00:00 2001 From: Enrico Giordani Date: Thu, 31 Dec 2020 17:51:01 +0100 Subject: [PATCH] [PowerRename] don't show an error message for invalid regex syntax (#8857) --- src/modules/powerrename/lib/PowerRenameManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/powerrename/lib/PowerRenameManager.cpp b/src/modules/powerrename/lib/PowerRenameManager.cpp index 47ba7002032c..4089a529858e 100644 --- a/src/modules/powerrename/lib/PowerRenameManager.cpp +++ b/src/modules/powerrename/lib/PowerRenameManager.cpp @@ -1060,7 +1060,9 @@ DWORD WINAPI CPowerRenameManager::s_regexWorkerThread(_In_ void* pv) } catch (...) { - MessageBox(NULL, L"RegexWorkerThread failed to execute.\nPlease report the bug to https://aka.ms/powerToysReportBug", L"PowerRename Error", MB_OK); + // TODO: an exception can happen while typing the expression and the syntax is not correct yet, + // we need to be more granular and raise an exception only when a real problem happened. + // MessageBox(NULL, L"RegexWorkerThread failed to execute.\nPlease report the bug to https://aka.ms/powerToysReportBug", L"PowerRename Error", MB_OK); } return 0;