Trap for TCPServer errors, otherwise continue.
326191
def handle_error(self, error=None):
        """"""
        if _debug: TCPServer._debug("handle_error %r", error)

        # core does not take parameters
        asyncore.dispatcher.handle_error(self)
243003
function sendError (
  event, message, recordName, socketWrapper, onError, options, context, metaData
) {
  options.logger.error(event, message, metaData)
  if (socketWrapper) {
    socketWrapper.sendError(C.TOPIC.RECORD, event, message)
  }
  if (onError) {
    onError.call(context, event, message, recordName, socketWrapper)
  }
}
1121101
def error_handler(task):
    """"""
    @wraps(task)
    def wrapper(self, *args, **kwargs):
        try:
            return task(self, *args, **kwargs)
        except Exception as e:
            self.connected = False
            if not self.testing:
                exc_type, exc_obj, exc_tb = sys.exc_info()
                fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
                error_message = (
                    "[" + str(datetime.now()) + "] Error in task \"" +
                    task.__name__ + "\" (" +
                    fname + "/" + str(exc_tb.tb_lineno) +
                    ")" + e.message
                )
                self.logger.error("%s: RPC instruction failed" % error_message)
    return wrapper
1133473
function onOutgoingError(err) {
    if (cb) {
      cb(err, req, socket);
    } else {
      server.emit('error', err, req, socket);
    }
    socket.end();
  }
396484
def is_retryable(err):
    
    if isinstance(err, ConnectionClosed):
        # NB: only retryable if we're not mid-streaming
        if err.mid_stream:
            return False
        else:
            return True
    elif isinstance(err, socket.error):
        code = err.args[0]
        return code in CONN_CLOSED_ERRORS
    else:
        return False
191188
def handle_error(self, request, client_address):
    """"""
    del request  # unused
    # Kludge to override a SocketServer.py method so we can get rid of noisy
    # EPIPE errors. They're kind of a red herring as far as errors go. For
    # example, `curl -N http://localhost:6006/ | head` will cause an EPIPE.
    exc_info = sys.exc_info()
    e = exc_info[1]
    if isinstance(e, IOError) and e.errno == errno.EPIPE:
      logger.warn('EPIPE caused by %s in HTTP serving' % str(client_address))
    else:
      logger.error('HTTP serving error', exc_info=exc_info)
660398
function(err){
  //if this is already a network error just throw it
  if(err instanceof NetworkError){
    throw err
  }
  //convert strings to errors
  if('string' === typeof err){
    err = new Error(err)
  }
  //check if the error message matches a known TCP error
  var error
  for(var i = 0; i < tcpErrors.length; i++){
    if(err.message.indexOf(tcpErrors[i]) >= 0){
      //lets throw a NetworkError
      error = new NetworkError(err.message)
      //preserve the original stack trace so we can actually debug these
      error.stack = err.stack
      throw error
    }
  }
  //if we make it here it is not an error we can handle just throw it
  throw err
}
658012
def _handle_retryable_error(self, e, retry_count):
        """"""
        if isinstance(e, error.RateLimitEnforcedError):
            time.sleep(e.retry_after)
        else:
            time.sleep(self.RETRY_DELAY * (self.RETRY_BACKOFF ** retry_count))
1289831
def handle_connection_error(func):
    """"""
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except device.interface.NotFoundError as e:
            log.error('Connection error (try unplugging and replugging your device): %s', e)
            return 1
    return wrapper
1035393
private function triggerSocketError()
	{
		$errorNo = \socket_last_error( $this->resource );
		$errorStr = \socket_strerror( $errorNo );
		\trigger_error( '\\Kshabazz\\Interception\\StreamWrappers\\Http ' . $errorStr );
	}
1315469
def on_error(self, ex):
        
        if self._d:
            self._d.errback()
            self._d = None
1092476
async def on_raw_error(self, message):
        
        error = protocol.ServerError(' '.join(message.params))
        await self.on_data_error(error)
1078426
function onerror(err) {
    if (!err) {
      return;
    }
    debug('[%s] [cfork:master:%s] master uncaughtException: %s', Date(), process.pid, err.stack);
    debug(err);
    debug('(total %d disconnect, %d unexpected exit)', disconnectCount, unexpectedCount);
  }
852744
def can_ignore_error(self, reqhnd=None):
        
        value = sys.exc_info()[1]
        try:
            if isinstance(value, BrokenPipeError) or \
                    isinstance(value, ConnectionResetError):
                return True
        except NameError:
            pass
        if not self.done:
            return False
        if not isinstance(value, socket.error):
            return False
        need_close = value.errno == 9
        if need_close and reqhnd is not None:
            reqhnd.close_connection = 1
        return need_close
267390
function setupErrorCatching() {
    process.on('uncaughtException', function (err) {
        if (err.toString() === "Error: watch EPERM") {
            // Silly User decided to DELETE a watched folder....  Need to eliminate the watch so it can be watched when they re-add it again.
            verifyWatches();
        } else {
            console.error(err);
        }
    });
}
233658
def loop_misc(self):
        """"""
        if self._sock is None and self._ssl is None:
            return MQTT_ERR_NO_CONN

        now = time.time()
        self._check_keepalive()
        if self._last_retry_check+1 < now:
            # Only check once a second at most
            self._message_retry_check()
            self._last_retry_check = now

        if self._ping_t > 0 and now - self._ping_t >= self._keepalive:
            # client->ping_t != 0 means we are waiting for a pingresp.
            # This hasn't happened in the keepalive time so we should disconnect.
            if self._ssl:
                self._ssl.close()
                self._ssl = None
            elif self._sock:
                self._sock.close()
                self._sock = None

            self._callback_mutex.acquire()
            if self._state == mqtt_cs_disconnecting:
                rc = MQTT_ERR_SUCCESS
            else:
                rc = 1
            if self.on_disconnect:
                self._in_callback = True
                self.on_disconnect(self, self._userdata, rc)
                self._in_callback = False
            self._callback_mutex.release()
            return MQTT_ERR_CONN_LOST

        return MQTT_ERR_SUCCESS
1244721
protected void handleError(InputStream stderr) throws IOException {
        byte[] buffer = new byte[4 * 1024];
        int    b;
        while ((b = stderr.read(buffer)) > 0) {
            err.write(buffer, 0, b);
        }
    }