Report the type and value that generated the error

This commit is contained in:
Evan Phoenix
2014-11-05 09:23:28 -08:00
parent 8ef71920bd
commit 34da10d880
+2 -2
View File
@@ -221,8 +221,8 @@ func (t *TomlTree) createSubTree(keys []string, pos Position) error {
case *TomlTree:
subtree = node
default:
return fmt.Errorf("unknown type for path %s (%s)",
strings.Join(keys, "."), intermediateKey)
return fmt.Errorf("unknown type for path %s (%s): %T (%#v)",
strings.Join(keys, "."), intermediateKey, nextTree, nextTree)
}
}
return nil