graphite-project / carbon

Exception caught is very general PYL-W0703
Anti-pattern
Major
4 years ago4 years old
Catching too general exception Exception
159
160  try:  # This only works on Linux
161    record('memUsage', getMemUsage())
162  except Exception:163    pass
164
165
Catching too general exception Exception
144          if not settings.SKIP_TAGS_FOR_NONTAGGED or ';' in metric:
145            tagQueue.add(metric)
146        instrumentation.increment('creates')
147      except Exception as e:148        log.err()
149        log.msg("Error creating %s: %s" % (metric, e))
150        instrumentation.increment('errors')
Catching too general exception Exception
168        if not settings.SKIP_TAGS_FOR_NONTAGGED or ';' in metric:
169          tagQueue.update(metric)
170      updateTime = time.time() - t1
171    except Exception as e:172      log.err()
173      log.msg("Error writing to %s: %s" % (metric, e))
174      instrumentation.increment('errors')
Catching too general exception Exception
189  while reactor.running:
190    try:
191      writeCachedDataPoints()
192    except Exception:193      log.err()
194      # Back-off on error to give the backend time to recover.
195      time.sleep(0.1)
Catching too general exception Exception
210  while reactor.running:
211    try:
212      writeTags()
213    except Exception:214      log.err()
215      # Back-off on error to give the backend time to recover.
216      time.sleep(0.1)