We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bf8916 commit ac8a9a5Copy full SHA for ac8a9a5
1 file changed
src/main.cpp
@@ -14,10 +14,23 @@ Configuration state;
14
15
int main(int argc, char **argv) {
16
17
- sqlcheck::ParseArguments(
18
- argc, argv, sqlcheck::state);
+ try {
19
20
- sqlcheck::Check(sqlcheck::state);
+ // Parse the input arguments from the user
+ // This customizes the checker configuration
21
+ sqlcheck::ParseArguments(
22
+ argc, argv, sqlcheck::state);
23
- return 0;
24
+ // Invoke the checker
25
+ sqlcheck::Check(sqlcheck::state);
26
+
27
+ }
28
+ // Catching at the top level ensures that
29
+ // destructors are always called
30
+ catch (std::exception& exc) {
31
+ std::cerr << exc.what() << std::endl;
32
+ exit(EXIT_FAILURE);
33
34
35
+ return (EXIT_SUCCESS);
36
}
0 commit comments