From 60dea270d0bc430930f5560ebac71a2dc0ab2b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophane=20Hufschmitt?= <7226587+thufschmitt@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:34:32 +0100 Subject: [PATCH] Swallow the error in a more idiomatic way --- src/libcmd/installables.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index e8836c247..f63b9eeae 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -258,9 +258,8 @@ void SourceExprCommand::completeInstallable(std::string_view prefix) getDefaultFlakeAttrPaths(), prefix); } - } catch (EvalError& e) { - // swallow eval error - (void)e; + } catch (EvalError&) { + // Don't want eval errors to mess-up with the completion engine, so let's just swallow them } }