From 74f0b203534212ec49c90fed6c23d766e132ee55 Mon Sep 17 00:00:00 2001 From: Patrick Mylund Nielsen Date: Thu, 23 Feb 2012 04:16:42 +0100 Subject: [PATCH] Don't fmt.Println warning if gob.Register fails--just return an err --- cache.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cache.go b/cache.go index 4fa92a5..f3740fe 100644 --- a/cache.go +++ b/cache.go @@ -204,13 +204,6 @@ func (c *cache) Save(w io.Writer) (err error) { defer func() { if x := recover(); x != nil { - fmt.Printf(`The Gob library paniced while registering the cache's item types! -Information: %v - -The cache will not be saved. -Please report under what conditions this happened, and particularly what special type of objects -were stored in cache, at https://github.com/pmylund/go-cache/issues/new -`, x) err = fmt.Errorf("Error registering item types with Gob library") } }()