Skip to content

Commit

Permalink
Fix: catch exception by reference, not copy
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan0x committed Sep 26, 2023
1 parent 76f10fa commit 9e16420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/unit.yy
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9e16420

Please sign in to comment.