Merge pull request #3 from silasdavis/master

From the department of pedantry
This commit is contained in:
Anton Kaliaev 2017-03-27 15:23:47 +04:00 committed by GitHub
commit 75a539ae3d
1 changed files with 4 additions and 4 deletions

View File

@ -23,23 +23,23 @@ func (se StackError) Error() string {
// A panic resulting from a sanity check means there is a programmer error // A panic resulting from a sanity check means there is a programmer error
// and some gaurantee is not satisfied. // and some gaurantee is not satisfied.
func PanicSanity(v interface{}) { func PanicSanity(v interface{}) {
panic(Fmt("Paniced on a Sanity Check: %v", v)) panic(Fmt("Panicked on a Sanity Check: %v", v))
} }
// A panic here means something has gone horribly wrong, in the form of data corruption or // A panic here means something has gone horribly wrong, in the form of data corruption or
// failure of the operating system. In a correct/healthy system, these should never fire. // failure of the operating system. In a correct/healthy system, these should never fire.
// If they do, it's indicative of a much more serious problem. // If they do, it's indicative of a much more serious problem.
func PanicCrisis(v interface{}) { func PanicCrisis(v interface{}) {
panic(Fmt("Paniced on a Crisis: %v", v)) panic(Fmt("Panicked on a Crisis: %v", v))
} }
// Indicates a failure of consensus. Someone was malicious or something has // Indicates a failure of consensus. Someone was malicious or something has
// gone horribly wrong. These should really boot us into an "emergency-recover" mode // gone horribly wrong. These should really boot us into an "emergency-recover" mode
func PanicConsensus(v interface{}) { func PanicConsensus(v interface{}) {
panic(Fmt("Paniced on a Consensus Failure: %v", v)) panic(Fmt("Panicked on a Consensus Failure: %v", v))
} }
// For those times when we're not sure if we should panic // For those times when we're not sure if we should panic
func PanicQ(v interface{}) { func PanicQ(v interface{}) {
panic(Fmt("Paniced questionably: %v", v)) panic(Fmt("Panicked questionably: %v", v))
} }