Merge PR #1227: Set all Error strings 1st letters to lowercase. Fixes issue #1154

This commit is contained in:
David Kajpust
2018-06-13 21:13:22 +02:00
committed by Christopher Goes
parent 157047c8a3
commit ec2fedd36c
28 changed files with 107 additions and 107 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ func GetFromBech32(bech32str, prefix string) ([]byte, error) {
}
if hrp != prefix {
return nil, fmt.Errorf("Invalid bech32 prefix. Expected %s, Got %s", prefix, hrp)
return nil, fmt.Errorf("invalid bech32 prefix. Expected %s, Got %s", prefix, hrp)
}
return bz, nil
+2 -2
View File
@@ -280,7 +280,7 @@ func ParseCoin(coinStr string) (coin Coin, err error) {
matches := reCoin.FindStringSubmatch(coinStr)
if matches == nil {
err = fmt.Errorf("Invalid coin expression: %s", coinStr)
err = fmt.Errorf("invalid coin expression: %s", coinStr)
return
}
denomStr, amountStr := matches[2], matches[1]
@@ -316,7 +316,7 @@ func ParseCoins(coinsStr string) (coins Coins, err error) {
// Validate coins before returning.
if !coins.IsValid() {
return nil, fmt.Errorf("ParseCoins invalid: %#v", coins)
return nil, fmt.Errorf("parseCoins invalid: %#v", coins)
}
return coins, nil
+14 -14
View File
@@ -68,31 +68,31 @@ const (
func CodeToDefaultMsg(code CodeType) string {
switch code {
case CodeInternal:
return "Internal error"
return "internal error"
case CodeTxDecode:
return "Tx parse error"
return "tx parse error"
case CodeInvalidSequence:
return "Invalid sequence"
return "invalid sequence"
case CodeUnauthorized:
return "Unauthorized"
return "unauthorized"
case CodeInsufficientFunds:
return "Insufficent funds"
return "insufficent funds"
case CodeUnknownRequest:
return "Unknown request"
return "unknown request"
case CodeInvalidAddress:
return "Invalid address"
return "invalid address"
case CodeInvalidPubKey:
return "Invalid pubkey"
return "invalid pubkey"
case CodeUnknownAddress:
return "Unknown address"
return "unknown address"
case CodeInsufficientCoins:
return "Insufficient coins"
return "insufficient coins"
case CodeInvalidCoins:
return "Invalid coins"
return "invalid coins"
case CodeOutOfGas:
return "Out of gas"
return "out of gas"
default:
return fmt.Sprintf("Unknown code %d", code)
return fmt.Sprintf("unknown code %d", code)
}
}
@@ -183,7 +183,7 @@ type sdkError struct {
// Implements ABCIError.
func (err *sdkError) Error() string {
return fmt.Sprintf("Error{%d:%d,%#v}", err.codespace, err.code, err.err)
return fmt.Sprintf("error{%d:%d,%#v}", err.codespace, err.code, err.err)
}
// Implements ABCIError.