diff options
| author | Patrick Steinhardt <[email protected]> | 2015-04-24 10:08:32 +0200 |
|---|---|---|
| committer | Patrick Steinhardt <[email protected]> | 2015-05-22 09:02:24 +0200 |
| commit | 7ee534d0c50f6b7b54a6e8c83e0953a95a4cac22 (patch) | |
| tree | 655b85874d99fec7c7d6d3d9e4e6d1f9fa46d692 /handles.go | |
| parent | e91965375551ff2ed68c0cea0c61a9ee4081ceb7 (diff) | |
handles: print pointer handle on panic.
Diffstat (limited to 'handles.go')
| -rw-r--r-- | handles.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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] |
