| 5418 | /////////////////////////////////////////////////////////////////////////// |
| 5419 | |
| 5420 | void OCIOYaml::Read(std::istream & istream, ConfigRcPtr & config, const char * filename) |
| 5421 | { |
| 5422 | try |
| 5423 | { |
| 5424 | YAML::Node node = YAML::Load(istream); |
| 5425 | load(node, config, filename); |
| 5426 | } |
| 5427 | catch(const std::exception & e) |
| 5428 | { |
| 5429 | std::ostringstream os; |
| 5430 | os << "Error: Loading the OCIO profile "; |
| 5431 | if (filename && filename[0] && |
| 5432 | Platform::Strcasecmp(filename, "from Archive/ConfigIOProxy") != 0) |
| 5433 | { |
| 5434 | os << "'" << filename << "' "; |
| 5435 | } |
| 5436 | os << "failed. " << e.what(); |
| 5437 | throw Exception(os.str().c_str()); |
| 5438 | } |
| 5439 | } |
| 5440 | |
| 5441 | void OCIOYaml::Write(std::ostream & ostream, const Config & config) |
| 5442 | { |
nothing calls this directly
no test coverage detected