Skip to content

Commit f8b92bb

Browse files
David Tolnayfacebook-github-bot
authored andcommitted
Remove unused exception parameter from pytorch/text/examples/libtorchtext/tokenizer/main.cpp
Summary: `-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: D58830948 fbshipit-source-id: 129097585ca4b0ae2ef3ef1621c290ea52375282
1 parent e10b25d commit f8b92bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/libtorchtext/tokenizer/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int main(int argc, const char* argv[]) {
1111
torch::jit::script::Module module;
1212
try {
1313
module = torch::jit::load(argv[1]);
14-
} catch (const c10::Error& e) {
14+
} catch (const c10::Error&) {
1515
return -1;
1616
}
1717

0 commit comments

Comments
 (0)