Permalink
Browse files

forgot to commit dbErrors.go

  • Loading branch information...
1 parent 8384982 commit 903be51b3e43d24ebf13e805e35e7a00499fa8ca @ericfode committed Aug 13, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −7 dbErrors.go
View
16 dbErrors.go
@@ -2,14 +2,16 @@ package spiderDB
import "fmt"
-type EdgeNotAddedToDBError Edge
+type KeyNotFoundError struct { Key string }
-type NodeNotAddedToDBError Node
+type dbError struct {
+ ErrStr string
+ }
-type KeyNotFoundError string
-
-type dbError string
+func (e *dbError) Error() string {
+ return fmt.Sprintf("%s", e.ErrStr)
+}
-func (e dbError) Error() string {
- return fmt.Sprintf("%s", e)
+func (e *KeyNotFoundError) Error() string {
+ return fmt.Sprintf("%s Not found", e.Key)
}

0 comments on commit 903be51

Please sign in to comment.