aboutsummaryrefslogtreecommitdiff
path: root/hotline/transaction.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-07-03 14:58:24 -0700
committerGitHub <noreply@github.com>2022-07-03 14:58:24 -0700
commit958108952eec4cef92bcd26cd0c845aaed5a4982 (patch)
treeecca9772097ff0804beb2df14efdf5a005fa09d3 /hotline/transaction.go
parent327d35f92fc5a642f6f11dce1a18601904634e48 (diff)
parent9174dbe8a9057e240fd9c3825c5720d13f2fafc2 (diff)
Merge pull request #55 from jhalter/add_client_error_messaging
Add error message handling to client
Diffstat (limited to 'hotline/transaction.go')
-rw-r--r--hotline/transaction.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/hotline/transaction.go b/hotline/transaction.go
index 88e17df..9b0ac40 100644
--- a/hotline/transaction.go
+++ b/hotline/transaction.go
@@ -1,6 +1,7 @@
package hotline
import (
+ "bytes"
"encoding/binary"
"errors"
"fmt"
@@ -238,3 +239,7 @@ func (t *Transaction) GetField(id int) Field {
return Field{}
}
+
+func (t *Transaction) IsError() bool {
+ return bytes.Compare(t.ErrorCode, []byte{0, 0, 0, 1}) == 0
+}