summaryrefslogtreecommitdiff
path: root/handles.go
diff options
context:
space:
mode:
authorPatrick Steinhardt <[email protected]>2015-04-24 10:08:32 +0200
committerPatrick Steinhardt <[email protected]>2015-05-22 09:02:24 +0200
commit7ee534d0c50f6b7b54a6e8c83e0953a95a4cac22 (patch)
tree655b85874d99fec7c7d6d3d9e4e6d1f9fa46d692 /handles.go
parente91965375551ff2ed68c0cea0c61a9ee4081ceb7 (diff)
handles: print pointer handle on panic.
Diffstat (limited to 'handles.go')
-rw-r--r--handles.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/handles.go b/handles.go
index d173785..1cbf6eb 100644
--- a/handles.go
+++ b/handles.go
@@ -1,6 +1,7 @@
package git
import (
+ "fmt"
"sync"
"unsafe"
)
@@ -72,7 +73,7 @@ func (v *HandleList) Get(handle unsafe.Pointer) interface{} {
v.RLock()
if _, ok := v.set[slot]; !ok {
- panic("invalid pointer handle")
+ panic(fmt.Sprintf("invalid pointer handle: %p", handle))
}
ptr := v.handles[slot]