def handle_error(self, request, client_address):
    # Sometimes when refreshing or navigating away from pages with
    # monitor divs, a Broken pipe exception is thrown on the socket
    # level. By overriding handle_error() we are able to ignore these:
    error = traceback.format_exc()
    if ("Broken pipe" in error):
      return

    # Otherwise we want to print the error like normal, except that,
    # because BBIOServer redirects stderr by default, we want it to
    # print to stdout:
    traceback.print_exc(file=sys.stdout)
    print '-'*40
    print 'Exception happened during processing of request from',
    print client_address    
    print '-'*40
Overrides HTTPServer.handle_error().
dataset/ETHPy150Open graycatlabs/PyBBIO/bbio/libraries/BBIOServer/bbio_server.py/BBIOHTTPServer.handle_error