Browse Source

raft: more descriptive panic info

Yicheng Qin 11 years ago
parent
commit
30289dad5c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      raft/raft_test.go

+ 2 - 1
raft/raft_test.go

@@ -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{