Skip to content

Commit

Permalink
configuration property to allow exceptions to escape .get
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrabung committed Mar 4, 2014
1 parent 6379ecc commit d891c57
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -125,9 +125,14 @@ class MemcachedPlugin(app: Application) extends CachePlugin {
)
} catch {
case e: Throwable =>
logger.error("An error has occured while getting the value from memcached" , e)
future.cancel(false)
None
if (app.configuration.getBoolean("memcached.throwExceptionFromGetOnError").getOrElse(false)) {
logger.error("An error has occured while getting the value from memcached" , e)
None
}
else {
throw e
}
}
}

Expand Down

0 comments on commit d891c57

Please sign in to comment.