Commit 9f1857c
authored
Currently, if one runs `chromobius` without any arguments, it prints the
help text but also produces a core dump. This happens because the end of
`src/chromobius/commands/main_all.cc` has
```cpp
throw std::invalid_argument(ss.str());
```
and this is not caught by `src/main.cc`. This commit adds a
`try`-`catch` to `src/main.cc` to catch the exception and exit with a
failure code. (This behavior is similar to what `main.perf.cc` does to
exit with an error.)
1 parent d3561ce commit 9f1857c
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | | - | |
18 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
0 commit comments