From 7f3778fa10dc9230a87f618af1e82a5a22f8424c Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 21 Nov 2016 17:36:59 +0100 Subject: ipc: extend error messages --- ipc/ipc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipc') diff --git a/ipc/ipc.go b/ipc/ipc.go index 41d22c705..b48513eb4 100644 --- a/ipc/ipc.go +++ b/ipc/ipc.go @@ -223,7 +223,7 @@ func (env *Env) Exec(p *prog.Prog) (output []byte, cov [][]uint32, errnos []int, return } if int(callIndex) > len(cov) { - err0 = fmt.Errorf("failed to read output coverage: expect index %v, got %v", i, callIndex) + err0 = fmt.Errorf("failed to read output coverage: record %v, call %v, total calls %v", i, callIndex, len(cov)) return } if cov[callIndex] != nil { @@ -238,7 +238,7 @@ func (env *Env) Exec(p *prog.Prog) (output []byte, cov [][]uint32, errnos []int, cov1 := make([]uint32, coverSize) for j := uint32(0); j < coverSize; j++ { if err := binary.Read(r, binary.LittleEndian, &pc); err != nil { - err0 = fmt.Errorf("failed to read output coverage: expect index %v, got %v", i, callIndex) + err0 = fmt.Errorf("failed to read output coverage: record %v, call %v, coversize=%v err=%v", i, callIndex, coverSize, err) return } cov1[j] = pc -- cgit mrf-deployment