Rev 1619 | Rev 1627 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1619 | Rev 1620 | ||
|---|---|---|---|
| Line 80... | Line 80... | ||
| 80 | std::ofstream file(this->filename_.data()); |
80 | std::ofstream file(this->filename_.data()); |
| 81 | 81 | ||
| 82 | if (!file.is_open()) |
82 | if (!file.is_open()) |
| 83 | { |
83 | { |
| 84 | throw std::runtime_error("Could not open " + this->filename_); |
84 | throw std::runtime_error("Could not open " + this->filename_); |
| 85 | return; |
- | |
| 86 | } |
85 | } |
| 87 | 86 | ||
| 88 | for (ParameterList::iterator it = this->parameters_.begin(); it != this->parameters_.end(); it++) |
87 | for (ParameterList::iterator it = this->parameters_.begin(); it != this->parameters_.end(); it++) |
| 89 | { |
88 | { |
| 90 | file << it->first << "=" << it->second << "\n"; |
89 | file << it->first << "=" << it->second << "\n"; |
| Line 105... | Line 104... | ||
| 105 | ParameterList::iterator it = this->parameters_.find(name); |
104 | ParameterList::iterator it = this->parameters_.find(name); |
| 106 | 105 | ||
| 107 | if (it == this->parameters_.end()) |
106 | if (it == this->parameters_.end()) |
| 108 | { |
107 | { |
| 109 | throw std::runtime_error("No such parameter"); |
108 | throw std::runtime_error("No such parameter"); |
| 110 | return ""; |
- | |
| 111 | } |
109 | } |
| 112 | 110 | ||
| 113 | return it->second; |
111 | return it->second; |
| 114 | } |
112 | } |
| 115 | 113 | ||