projects
/
ssic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffb3828
)
Exit on failure to open files.
author
P. J. McDermott
<pjm@nac.net>
Sun, 22 Sep 2013 19:07:10 +0000
(15:07 -0400)
committer
P. J. McDermott
<pjm@nac.net>
Sun, 22 Sep 2013 19:07:10 +0000
(15:07 -0400)
src/ssic.pl
patch
|
blob
|
history
diff --git
a/src/ssic.pl
b/src/ssic.pl
index 80e2071b41db0ccecf3f8ce9402f182009f871de..553f83d00162787b840086237886d91e2df5ff4b 100644
(file)
--- a/
src/ssic.pl
+++ b/
src/ssic.pl
@@
-112,8
+112,12
@@
sub compile
error(4, "Input and output files are equal\n");
}
- open($input_fh, "<", $input);
- open($output_fh, ">", $output);
+ if (not open($input_fh, "<", $input)) {
+ error(4, "%s: %s\n", $input, $!);
+ }
+ if (not open($output_fh, ">", $output)) {
+ error(4, "%s: %s\n", $output, $!);
+ }
%ENV = (
"DOCUMENT_NAME" => $input,