]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction.go
Add error message handling to client
[rbdr/mobius] / hotline / transaction.go
index 88e17dfcad2471d707575b6ba5422546e2578632..9b0ac407f81e9c694f2d710f10416392b2eccc6b 100644 (file)
@@ -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
+}