Summary
In MacroBNGModel.pm, when opening the .rab output file for writing, the die message incorrectly prints $netfile instead of $rabfile. If the write-open fails, the error will blame the wrong file.
Location
File: bng2/Perl2/MacroBNGModel.pm, line 991
Current behavior
$rabfile = "macr_${param_prefix}.rab";
$netfile = "macr_${param_prefix}.net";
open (RFILEnet, "<", $netfile) or die "Can't open $netfile: $!\n";
open (WFILErab, ">", $rabfile) or die "Can't open $netfile: $!\n";
# ^^^^^^^^
# Should be $rabfile
If the .rab file can't be opened for writing (e.g., permissions issue), the error message will say:
Can't open macr_foo.net: Permission denied
...when the actual problem is with macr_foo.rab.
Expected behavior
open (WFILErab, ">", $rabfile) or die "Can't open $rabfile: $!\n";
How to verify
sed -n '988,992p' bng2/Perl2/MacroBNGModel.pm
Suggested fix
Change $netfile to $rabfile in the die string on line 991.
Summary
In
MacroBNGModel.pm, when opening the.raboutput file for writing, thediemessage incorrectly prints$netfileinstead of$rabfile. If the write-open fails, the error will blame the wrong file.Location
File:
bng2/Perl2/MacroBNGModel.pm, line 991Current behavior
If the
.rabfile can't be opened for writing (e.g., permissions issue), the error message will say:...when the actual problem is with
macr_foo.rab.Expected behavior
How to verify
sed -n '988,992p' bng2/Perl2/MacroBNGModel.pmSuggested fix
Change
$netfileto$rabfilein the die string on line 991.