From 9e1642002c91283ceb6f6f6ba59c37b66888caeb Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Tue, 26 Sep 2023 14:14:07 +0200 Subject: [PATCH] Fix: catch exception by reference, not copy --- src/parser/unit.yy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/unit.yy b/src/parser/unit.yy index 34febc1bdf..03ebf31ed2 100644 --- a/src/parser/unit.yy +++ b/src/parser/unit.yy @@ -107,7 +107,7 @@ table_insertion try { $1->insert($2); } - catch (std::runtime_error e) { + catch (const std::runtime_error& e) { error(scanner.loc, e.what()); } $$ = $1;