Skip to content

Commit

Permalink
[FEATURE] Print error message if opening in/out files failed
Browse files Browse the repository at this point in the history
  • Loading branch information
hasherezade committed Sep 10, 2020
1 parent 10f0d81 commit 70d7164
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions masm_shc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ bool process_file(t_params &params)
{
std::ifstream file(params.infile);
if (!file.is_open()) {
std::cerr << "[ERROR] Opening the input file failed!\n";
return false;
}

std::ofstream ofile(params.outfile);
if (!ofile.is_open()) {
std::cerr << "[ERROR] Opening the output file failed!\n";
return false;
}
std::map<std::string, std::string> consts_lines;
Expand Down

0 comments on commit 70d7164

Please sign in to comment.