Skip to content

Commit

Permalink
JSON formatter: show filename on empty input (CleverRaven#56524)
Browse files Browse the repository at this point in the history
* JSON formatter: show filename on empty input

* [SQUASH ME] empty JSON file

* [SQUASH ME] remove empty JSON file
  • Loading branch information
dseguin authored Apr 2, 2022
1 parent e5f7ce7 commit 5c39685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/format/format_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int main( int argc, char *argv[] )
}

if( in.str().empty() ) {
std::cout << "Error, input empty." << std::endl;
std::cout << "Error, " << ( filename.empty() ? "input" : filename ) << " is empty." << std::endl;
exit( EXIT_FAILURE );
}
JsonOut jsout( out, true );
Expand Down

0 comments on commit 5c39685

Please sign in to comment.