Use std::cerr instead of std::cout for error messages

This commit is contained in:
Thadeus Fleming
2016-12-10 11:49:44 -06:00
parent 150ea9f094
commit fb1925e0d8
14 changed files with 29 additions and 29 deletions

View File

@ -80,7 +80,7 @@ static void _mkdir(const char *dir) {
if ( stat( tmp , &buf ) != 0 ) {
int returnValue = mkdir(tmp, S_IRWXU | S_IRWXG | S_IRWXO);
if (returnValue) {
std::cout << bold(color(ERROR, "Error")) << " Unable to create " << quote(bold(tmp)) << " for writing: " << strerror(errno) << std::endl;
std::cerr << bold(color(ERROR, "Error")) << " Unable to create " << quote(bold(tmp)) << " for writing: " << strerror(errno) << std::endl;
return ;
}
}
@ -89,7 +89,7 @@ static void _mkdir(const char *dir) {
if ( stat( tmp , &buf ) != 0 ) {
int returnValue = mkdir(tmp, S_IRWXU | S_IRWXG | S_IRWXO);
if (returnValue) {
std::cout << bold(color(ERROR, "Error")) << " Unable to create " << quote(bold(tmp)) << " for writing: " << strerror(errno) << std::endl;
std::cerr << bold(color(ERROR, "Error")) << " Unable to create " << quote(bold(tmp)) << " for writing: " << strerror(errno) << std::endl;
return ;
}
}