title: python custom exception handler for a class
body: <p>I want to build my application with a redis cache. but maybe redis is not available all the time in our case,<br>
  so I hope, it redis works well, we use it.  if it can't work, just logging and ignore it this time.</p>
  
  <p>for example:</p>
  
  <pre>
  try:
    conn.sadd('s', *array)
  except :
    ...
  </pre>
  
  <p>since there are many place I will run some conn.{rediscommand},  I don't like to use try/except every place. </p>
  
  <p>so the solution maybe :</p>
  
  <pre>
  class softcache(redis.StrictRedis):
     def sadd(key, *p):
         try:
            super(redis.StrictRedis, self).sadd(key, p)
         except:
            ..
  </pre>    
  
  <p>but since redis have many commands,  I have to warp them one by one. </p>
  
  <p>is it possible to custom a exception handler for a class to handle all the exceptions which come from this class ?</p>