diff --git a/rdf/parse.go b/rdf/parse.go index f8501c4e48eec0881eba4155b702835eb07669c1..be0d5611b63d14816379a4a67bbd758a19643a83 100644 --- a/rdf/parse.go +++ b/rdf/parse.go @@ -139,7 +139,7 @@ func Parse(line string) (rnq NQuad, rerr error) { // TODO: Strictly parse common types like integers, floats etc. if len(oval) == 0 { glog.Fatalf( - "itemObject should be emitted before itemObjectType. Input: %q", + "itemObject should be emitted before itemObjectType. Input: [%s]", line) } oval += "@@" + stripBracketsIfPresent(item.Val) @@ -155,16 +155,16 @@ func Parse(line string) (rnq NQuad, rerr error) { } } if !vend { - return rnq, fmt.Errorf("Invalid end of input") + return rnq, fmt.Errorf("Invalid end of input. Input: [%s]", line) } if len(oval) > 0 { rnq.ObjectValue = oval } if len(rnq.Subject) == 0 || len(rnq.Predicate) == 0 { - return rnq, fmt.Errorf("Empty required fields in NQuad") + return rnq, fmt.Errorf("Empty required fields in NQuad. Input: [%s]", line) } if len(rnq.ObjectId) == 0 && rnq.ObjectValue == nil { - return rnq, fmt.Errorf("No Object in NQuad") + return rnq, fmt.Errorf("No Object in NQuad. Input: [%s]", line) } return rnq, nil