| 47 | } |
| 48 | |
| 49 | Status YamlReader::ExtractMap(const Node* node, |
| 50 | const string& field, |
| 51 | Node* result) { |
| 52 | CHECK(result); |
| 53 | Node val; |
| 54 | RETURN_NOT_OK(ExtractField(node, field, &val)); |
| 55 | if (PREDICT_FALSE(!val.IsMap())) { |
| 56 | return Status::Corruption(Substitute( |
| 57 | "wrong type during field extraction: expected map but got $0", |
| 58 | TypeToString(val.Type()))); |
| 59 | } |
| 60 | *result = val; |
| 61 | return Status::OK(); |
| 62 | } |
| 63 | |
| 64 | Status YamlReader::ExtractField(const Node* node, |
| 65 | const string& field, |
nothing calls this directly
no test coverage detected