| 833 | } |
| 834 | |
| 835 | Status AttachDef(const Status& status, const NodeDef& node_def, |
| 836 | bool allow_multiple_formatted_node) { |
| 837 | Status ret = status; |
| 838 | string node_error; |
| 839 | if (!allow_multiple_formatted_node && |
| 840 | status.error_message().find("{{node ") != string::npos) { |
| 841 | node_error = node_def.name(); |
| 842 | } else { |
| 843 | node_error = FormatNodeDefForError(node_def); |
| 844 | } |
| 845 | errors::AppendToMessage(&ret, strings::StrCat(" [[", node_error, "]]")); |
| 846 | return ret; |
| 847 | } |
| 848 | |
| 849 | Status AttachDef(const Status& status, const Node& node, |
| 850 | bool allow_multiple_formatted_node) { |