Browse Source

panic if invalid consistency provided

Adam Weiner 10 years ago
parent
commit
868223bd79
1 changed files with 4 additions and 2 deletions
  1. 4 2
      frame.go

+ 4 - 2
frame.go

@@ -192,14 +192,16 @@ func ParseConsistency(s string) Consistency {
 		return Three
 	case "QUORUM":
 		return Quorum
+	case "ALL":
+		return All;
 	case "LOCAL_QUORUM":
 		return LocalQuorum
 	case "EACH_QUORUM":
 		return EachQuorum
 	case "LOCAL_ONE":
 		return LocalOne
-	default: // "ALL"
-		return All
+	default:
+		panic("invalid consistency: " + s)
 	}
 }