Skip to content

Commit

Permalink
Return exit code 1 in case of exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukigaru committed May 19, 2024
1 parent dd16729 commit 3569c47
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/task-2/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ int main() {

} catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
return 1;
}

return 0;
Expand Down
1 change: 1 addition & 0 deletions src/task-3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ int main() {

} catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
return 1;
}

return 0;
Expand Down
1 change: 1 addition & 0 deletions src/task-4/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ int main() {

} catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
return 1;
}
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions src/task-5/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ int main() {

} catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
return 1;
}
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions src/task-6/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ int main() {

} catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
return 1;
}
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions src/task-7/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ int main() {

} catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
return 1;
}
return 0;
}
Expand Down

0 comments on commit 3569c47

Please sign in to comment.