| 229 | } |
| 230 | |
| 231 | bool Options::LoadFile(const std::string& option_file) { |
| 232 | YAML::Node node; |
| 233 | try { |
| 234 | node = YAML::LoadFile(option_file); |
| 235 | } catch (const YAML::BadFile& e) { |
| 236 | LOG(ERROR) << "Error in loading option file: " << e.what(); |
| 237 | return false; |
| 238 | } |
| 239 | return SetOptions(node); |
| 240 | } |
| 241 | |
| 242 | bool Options::SetOptions(const YAML::Node& map) { |
| 243 | std::string worker_type_str; |