ruby: Added error check for openning the ruby config file
This commit is contained in:
parent
3cf24f9716
commit
dce53610c3
1 changed files with 7 additions and 0 deletions
|
@ -58,8 +58,15 @@ RubyMemory::RubyMemory(const Params *p)
|
|||
ruby_clock = p->clock;
|
||||
ruby_phase = p->phase;
|
||||
|
||||
DPRINTF(Ruby, "creating Ruby Memory from file %s\n",
|
||||
p->config_file.c_str());
|
||||
|
||||
ifstream config(p->config_file.c_str());
|
||||
|
||||
if (config.good() == false) {
|
||||
fatal("Did not successfully open %s.\n", p->config_file.c_str());
|
||||
}
|
||||
|
||||
vector<RubyObjConf> sys_conf;
|
||||
while (!config.eof()) {
|
||||
char buffer[65536];
|
||||
|
|
Loading…
Reference in a new issue