Skip to content

Commit dbdb625

Browse files
Added error handling
1 parent 939f2ce commit dbdb625

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

internal/transprocessor/perm-processor.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,16 @@ func (p *PermProcessor) Process(ctx context.Context, curSession *session.Session
5959
} else {
6060
if isRemote {
6161
/* handle through daemons */
62-
p.HandleRemoteTransaction(host, port, txn, absolutePath)
62+
if err := p.HandleRemoteTransaction(host, port, txn, absolutePath); err != nil {
63+
p.errCh <- err
64+
return fmt.Errorf("failed to handle remote transaction")
65+
}
6366
} else {
6467
/* handle locally */
65-
66-
/* HandleLocalTransactions(txn) */
67-
p.HandleLocalTransaction(txn, absolutePath)
68+
if err := p.HandleLocalTransaction(txn, absolutePath); err != nil {
69+
p.errCh <- err
70+
return fmt.Errorf("failed to handler local transaction")
71+
}
6872
}
6973
}
7074

0 commit comments

Comments
 (0)