Return CKError instead of custom error when encryption fails

This commit is contained in:
Tobie Morgan Hitchcock 2016-09-06 14:32:21 +01:00
parent c355464094
commit a3672d28b3

View file

@ -15,7 +15,6 @@
package kvs package kvs
import ( import (
"fmt"
"strings" "strings"
"github.com/abcum/surreal/cnf" "github.com/abcum/surreal/cnf"
@ -74,7 +73,7 @@ func (db *DB) enc(opts *cnf.Options) (err error) {
} }
if kv.Exists() == true && kv.Str() != "±" { if kv.Exists() == true && kv.Str() != "±" {
err = fmt.Errorf("Please provide a valid encryption key for the stored data.") err = new(CKError)
} }
return return