mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: more descriptive panic info
This commit is contained in:
@@ -2,6 +2,7 @@ package raft
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"sort"
|
||||
@@ -932,7 +933,7 @@ func newNetwork(peers ...Interface) *network {
|
||||
case *blackHole:
|
||||
npeers[id] = v
|
||||
default:
|
||||
panic("unimplemented")
|
||||
panic(fmt.Sprintf("unexpected state machine type: %T", p))
|
||||
}
|
||||
}
|
||||
return &network{
|
||||
|
||||
Reference in New Issue
Block a user