From ce8bfece2df685ed12c0ead6e9d0515a7a99c2a6 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Mon, 4 Apr 2022 19:10:58 +0200 Subject: [PATCH] fix(env): log error on window title --- src/environment/windows.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/environment/windows.go b/src/environment/windows.go index 57033a44..4ffa6b38 100644 --- a/src/environment/windows.go +++ b/src/environment/windows.go @@ -72,7 +72,11 @@ func (env *ShellEnvironment) Home() string { func (env *ShellEnvironment) QueryWindowTitles(processName, windowTitleRegex string) (string, error) { defer env.trace(time.Now(), "WindowTitle", windowTitleRegex) - return queryWindowTitles(processName, windowTitleRegex) + title, err := queryWindowTitles(processName, windowTitleRegex) + if err != nil { + env.log(Error, "QueryWindowTitles", err.Error()) + } + return title, err } func (env *ShellEnvironment) IsWsl() bool {