Commit 6c5ae4154d1a234082f502a8ae59ca9d1dbd4ebb
Better parsing error messages for new subcommand
Author: xaizek
Author date (UTC): 2018-11-19 17:36
Committer name: xaizek
Committer date (UTC): 2018-11-19 17:38
Parent(s): 575c10c42e15106d33a46d2f2a7cf12b010b9753
Signing key: 99DC5E4DB05F6BE2
Tree: acf63c4e06e0b282b13beb06b7651b88791181c3
File src/sub_commands.cpp changed (mode: 100644) (index 1649be5..7bb942b) |
... |
... |
private: |
721 |
721 |
|
|
722 |
722 |
int nLines; |
int nLines; |
723 |
723 |
if (!(std::cin >> nLines) || nLines < 0) { |
if (!(std::cin >> nLines) || nLines < 0) { |
724 |
|
std::cerr << "Invalid input format\n"; |
|
|
724 |
|
std::cerr << "Invalid input format: " |
|
725 |
|
"no or bad coverage size for " |
|
726 |
|
<< path << '\n'; |
725 |
727 |
error(); |
error(); |
726 |
728 |
break; |
break; |
727 |
729 |
} |
} |
|
... |
... |
private: |
732 |
734 |
while (nLines-- > 0) { |
while (nLines-- > 0) { |
733 |
735 |
int i; |
int i; |
734 |
736 |
if (!(std::cin >> i)) { |
if (!(std::cin >> i)) { |
735 |
|
std::cerr << "Invalid input format\n"; |
|
|
737 |
|
std::cerr << "Invalid input format: " |
|
738 |
|
"failed to read coverage count for " |
|
739 |
|
<< path << '\n'; |
736 |
740 |
error(); |
error(); |
737 |
741 |
break; |
break; |
738 |
742 |
} |
} |