Skip to content

Commit

Permalink
Remove unused exception parameter from velox/functions/lib/SubscriptU…
Browse files Browse the repository at this point in the history
…til.cpp (facebookincubator#8767)

Summary:
Pull Request resolved: facebookincubator#8767

`-Wunused-exception-parameter` has identified an unused exception parameter. This diff removes it.

This:
```
try {
    ...
} catch (exception& e) {
    // no use of e
}
```
should instead be written as
```
} catch (exception&) {
```

If the code compiles, this is safe to land.

Reviewed By: dmm-fb

Differential Revision: D53780438

fbshipit-source-id: c414827341cea1227983ba80c373f15d8c0aaa7b
  • Loading branch information
r-barnes authored and facebook-github-bot committed Feb 16, 2024
1 parent 641f558 commit dadade0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions velox/functions/lib/SubscriptUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,23 +318,23 @@ namespace {
std::exception_ptr makeZeroSubscriptError() {
try {
VELOX_USER_FAIL("SQL array indices start at 1");
} catch (const std::exception& e) {
} catch (const std::exception&) {
return std::current_exception();
}
}

std::exception_ptr makeBadSubscriptError() {
try {
VELOX_USER_FAIL("Array subscript out of bounds.");
} catch (const std::exception& e) {
} catch (const std::exception&) {
return std::current_exception();
}
}

std::exception_ptr makeNegativeSubscriptError() {
try {
VELOX_USER_FAIL("Array subscript is negative.");
} catch (const std::exception& e) {
} catch (const std::exception&) {
return std::current_exception();
}
}
Expand Down

0 comments on commit dadade0

Please sign in to comment.