Skip to content

Commit

Permalink
Better error message on unknown result types
Browse files Browse the repository at this point in the history
  • Loading branch information
khaf committed May 30, 2015
1 parent 3c08593 commit e76fc5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/result_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

package types

import "fmt"

// ResultCode signifies the database operation error codes.
// The positive numbers align with the server side file proto.h.
type ResultCode int
Expand Down Expand Up @@ -423,6 +425,6 @@ func ResultCodeToString(resultCode ResultCode) string {
return "Query error"

default:
return "Error message not available yet - please file an issue on github."
return fmt.Sprintf("Error code (%v) not available yet - please file an issue on github.", resultCode)
}
}

0 comments on commit e76fc5d

Please sign in to comment.