diff options
author | Fabricio Voznika <fvoznika@google.com> | 2020-08-18 18:50:24 -0700 |
---|---|---|
committer | Rahat Mahmood <46939889+mrahatm@users.noreply.github.com> | 2020-08-19 11:38:34 -0700 |
commit | cf38ac1c6c32b4c514bb56fc70073788835f3766 (patch) | |
tree | 01415445bd2b22383752a96e17a632c9c66a2fe2 /pkg/sentry | |
parent | e38e559d23ddc92cf9f94ad4207e2ea48bf4c8df (diff) |
Add more information to panic when device ID don't match
PiperOrigin-RevId: 327351357
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/device/device.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/device/device.go b/pkg/sentry/device/device.go index f45b2bd2b..6ca9dc79f 100644 --- a/pkg/sentry/device/device.go +++ b/pkg/sentry/device/device.go @@ -256,7 +256,7 @@ func (m *MultiDevice) Load(key MultiDeviceKey, value uint64) bool { } if k, exists := m.rcache[value]; exists && k != key { // Should never happen. - panic("MultiDevice's caches are inconsistent") + panic(fmt.Sprintf("MultiDevice's caches are inconsistent, current: %+v, previous: %+v", key, k)) } // Cache value at key. |