Handles parse error for aclitem[]

pull/210/head
Manni Wood 2016-11-15 22:05:52 -05:00
parent 5712d02e1b
commit 6ec7e84dbf
2 changed files with 5 additions and 4 deletions

View File

@ -3176,9 +3176,11 @@ func decodeAclItemArray(vr *ValueReader) []AclItem {
// remove the '{' at the front and the '}' at the end
str = str[1 : len(str)-1]
strs, _ := ParseAclItemArray(str)
// XXX: what do I do with the error here?
// XXX strs := strings.Split(str, ",")
strs, err := ParseAclItemArray(str)
if err != nil {
vr.Fatal(ProtocolError(err.Error()))
return nil
}
// cast strings into AclItems before returning
aclitems := make([]AclItem, len(strs))

View File

@ -649,7 +649,6 @@ func assertAclItemSlicesEqual(t *testing.T, query, scan []pgx.AclItem) {
}
}
// XXX
func TestAclArrayDecoding(t *testing.T) {
t.Parallel()