Skip to content

Commit 70d7164

Browse files
committed
[FEATURE] Print error message if opening in/out files failed
1 parent 10f0d81 commit 70d7164

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

masm_shc/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,13 @@ bool process_file(t_params &params)
9797
{
9898
std::ifstream file(params.infile);
9999
if (!file.is_open()) {
100+
std::cerr << "[ERROR] Opening the input file failed!\n";
100101
return false;
101102
}
102103

103104
std::ofstream ofile(params.outfile);
104105
if (!ofile.is_open()) {
106+
std::cerr << "[ERROR] Opening the output file failed!\n";
105107
return false;
106108
}
107109
std::map<std::string, std::string> consts_lines;

0 commit comments

Comments
 (0)