From: erickson Date: Fri, 11 Aug 2006 20:21:39 +0000 (+0000) Subject: logging put errors instead of throwing exception X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=da4c57cdad86fb30e183684f8a15539bbb2555cb;p=working%2FOpenSRF.git logging put errors instead of throwing exception git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@756 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/Utils/Cache.pm b/src/perlmods/OpenSRF/Utils/Cache.pm index 96b778a..ac430bd 100644 --- a/src/perlmods/OpenSRF/Utils/Cache.pm +++ b/src/perlmods/OpenSRF/Utils/Cache.pm @@ -102,8 +102,10 @@ sub put_cache { $expiretime ||= $max_persist_time; - $self->{memcache}->set( $key, $value, $expiretime ) || - throw OpenSRF::EX::ERROR ("Unable to store $key => $value in memcached server" ); + unless( $self->{memcache}->set( $key, $value, $expiretime ) ) { + $log->error("Unable to store $key => [".length($value)." bytes] in memcached server" ); + return undef; + } $log->debug("Stored $key => $value in memcached server", INTERNAL);