From f5df4898a311ef58808ae570db1a03578c7bb5aa Mon Sep 17 00:00:00 2001 From: andrew fabbro Date: Mon, 5 Sep 2016 09:59:44 -0700 Subject: [PATCH] Fixed {Write,Query}Result to set Err properly. --- query.go | 4 ++-- write.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/query.go b/query.go index ce4ae4d..23923d6 100644 --- a/query.go +++ b/query.go @@ -159,8 +159,8 @@ func (conn *Connection) Query(sqlStatements []string) (results []QueryResult, er // did we get an error? _, ok := thisResult["error"] if ok { - trace("%s: have an error this this result: %s",conn.ID,thisResult["error"].(string)) - thisQR.Err = err + trace("%s: have an error on this result: %s",conn.ID,thisResult["error"].(string)) + thisQR.Err = errors.New(thisResult["error"].(string)) results = append(results,thisQR) numStatementErrors++ continue diff --git a/write.go b/write.go index 909dbd3..724a25e 100644 --- a/write.go +++ b/write.go @@ -127,8 +127,8 @@ func (conn *Connection) Write(sqlStatements []string) (results []WriteResult, er // did we get an error? _, ok := thisResult["error"] if ok { - trace("%s: have an error this this result: %s",conn.ID,thisResult["error"].(string)) - thisWR.Err = err + trace("%s: have an error on this result: %s",conn.ID,thisResult["error"].(string)) + thisWR.Err = errors.New(thisResult["error"].(string)) results = append(results,thisWR) numStatementErrors += 1 continue