Handles the given exception thrown by a subscriber with the given context.
327650
void handleSubscriberException(Throwable e, SubscriberExceptionContext context) {
    checkNotNull(e);
    checkNotNull(context);
    try {
      exceptionHandler.handleException(e, context);
    } catch (Throwable e2) {
      // if the handler threw an exception... well, just log it
      logger.log(Level.SEVERE,
          String.format("Exception %s thrown while handling exception: %s", e2, e), e2);
    }
  }
1125072
private void handleExceptions(Subroutine subroutine, InstructionHandle pei, BasicBlock etb) {
        etb.setExceptionThrower(pei);

        // Remember whether or not a universal exception handler
        // is reachable. If so, then we know that exceptions raised
        // at this instruction cannot propagate out of the method.
        boolean sawUniversalExceptionHandler = false;

        List<CodeExceptionGen> exceptionHandlerList = exceptionHandlerMap.getHandlerList(pei);
        if (exceptionHandlerList != null) {
            for (CodeExceptionGen exceptionHandler : exceptionHandlerList) {
                InstructionHandle handlerStart = exceptionHandler.getHandlerPC();
                subroutine.addEdgeAndExplore(etb, handlerStart, HANDLED_EXCEPTION_EDGE);

                if (Hierarchy.isUniversalExceptionHandler(exceptionHandler.getCatchType())) {
                    sawUniversalExceptionHandler = true;
                }
            }
        }

        // If required, mark this block as throwing an unhandled exception.
        // For now, we assume that if there is no reachable handler that handles
        // ANY exception type, then the exception can be thrown out of the
        // method.
        if (!sawUniversalExceptionHandler) {
            if (DEBUG) {
                System.out.println("Adding unhandled exception edge from " + pei);
            }
            subroutine.setUnhandledExceptionBlock(etb);
        }
    }
1243046
private void handleResponse(ByteBuf response, ChannelHandlerContext context) {
    NettyConnection connection = getConnection(context.channel());
    if (connection != null) {
      connection.handleResponse(response);
    }
  }
796235
def process_exception(self, request, exception):
        
        if self.in_lambda_ctx:
            segment = xray_recorder.current_subsegment()
        else:
            segment = xray_recorder.current_segment()
        segment.put_http_meta(http.STATUS, 500)

        stack = stacktrace.get_stacktrace(limit=xray_recorder._max_trace_back)
        segment.add_exception(exception, stack)
374321
public void setException(Throwable exception) {
    this.exception = exception;

    if (handlers != null) {
      for (IsSimplePromiseResponseHandler<T> h : handlers) {
        h.onResponse(this);
      }
    }
  }
43890
protected void handleExceptions(MessageEvent messageEvent, Exception exception) {
        logger.error("Unknown exception. Internal Server Error.", exception);
        writeErrorResponse(messageEvent,
                           HttpResponseStatus.INTERNAL_SERVER_ERROR,
                           "Internal Server Error");
    }
975572
public void handleFailure (Exception error)
    {
        if (error instanceof InvocationException) {
            _listener.requestFailed(error.getMessage());
        } else {
            if (_args != null) {
                log.warning(getFailureMessage(), ArrayUtil.append(_args, error));
            } else {
                log.warning(getFailureMessage(), error);
            }
            _listener.requestFailed(InvocationCodes.INTERNAL_ERROR);
        }
    }
254105
def handle_error(self, error=None):
        """"""
        if _debug: TCPClient._debug("handle_error %r", error)

        # core does not take parameters
        asyncore.dispatcher.handle_error(self)
314383
private void processPendingExceptionHandlerEntry(int astoreVar) {
        if (pendingExceptionHandlerTypeName != null) {
            Type exceptionType = Type.getObjectType(pendingExceptionHandlerTypeName);
            pendingExceptionHandlerTypeName = null;
            if (onExceptionHandlerEntry(exceptionType, astoreVar)) {
                visitFrameAfterOnExceptionHandlerEntry();
            }
        }
    }
251291
def _handle_chat_event(self, event: events.ChatMessageWasReceived) -> None:
        
        for subscriber in self._chat_subscribers:
            try:
                subscriber(event)
            except Exception:
                LOG.exception(self._prefix_log_message(
                    f"failed to send chat event {event} to "
                    f"subscriber {subscriber}"
                ))
1336321
protected void handleConfigureResponseFailure(MemberState member, ConfigureRequest request, Throwable error) {
    // Log the failed attempt to contact the member.
    failAttempt(member, error);
  }
412458
protected void handleError(String errMsg) throws Exception {
    // log it
    LOGGER.log(Level.SEVERE, errMsg);
    // and throw an error if this is configured
    if (this.isThrowExceptionOnError()) {
      throw new Exception(errMsg);
    }
  }
812913
def _handle_exception(self, sender, exception=None):
        
        honeybadger.notify(exception)
        if self.reset_context_after_request:
            self._reset_context()
580157
public static void handleException(final Exception exception) throws SQLException {
        if (isExceptionThrown()) {
            if (exception instanceof SQLException) {
                throw (SQLException) exception;
            }
            throw new ShardingException(exception);
        }
        log.error("exception occur: ", exception);
    }
1185474
@Override
    public void onError(ChannelHandlerContext ctx, boolean outbound, Throwable cause) {
        Http2Exception embedded = getEmbeddedHttp2Exception(cause);
        if (isStreamError(embedded)) {
            onStreamError(ctx, outbound, cause, (StreamException) embedded);
        } else if (embedded instanceof CompositeStreamException) {
            CompositeStreamException compositException = (CompositeStreamException) embedded;
            for (StreamException streamException : compositException) {
                onStreamError(ctx, outbound, cause, streamException);
            }
        } else {
            onConnectionError(ctx, outbound, cause, embedded);
        }
        ctx.flush();
    }
1348152
def handle_exception(self, exc):
        """"""
        if isinstance(
            exc, (rest_exceptions.NotAuthenticated,
                  rest_exceptions.AuthenticationFailed)) and self.HANDLE_UNAUTHENTICATED:
            return HttpResponseRedirect('{}?next={}'.format(
                reverse('users:login'),
                self.request.get_full_path()))

        if isinstance(exc, Http404):
            raise Http404()

        if isinstance(exc, rest_exceptions.PermissionDenied):
            raise django_exceptions.PermissionDenied()

        return super().handle_exception(exc)
442283
public void handleExceptionRead(Exception e)
      {
        final String mName = "handleException";
        
        logger.finer("SKIPHANDLE: in skiphandler handle exception on a read");

        if(logger.isLoggable(Level.FINER)) 
          logger.logp(Level.FINE, className, mName, e.getClass().getName() + "; " + this.toString());
        
        if (!isSkipLimitReached() && excMatcher.isSkippableOrRetryable(e))
        {
          // Skip it.  Log it.  Call the SkipListener.
          ++_skipCount;
          logSkip(e);

          if (_skipReadListener != null) {
              for (SkipReadListenerProxy skipReadListenerProxy : _skipReadListener) {
                  skipReadListenerProxy.onSkipReadItem(e);
                }
          }
        }
        else
        {
          // No skip.  Throw it back. don't throw it back - we might want to retry ...
          if(logger.isLoggable(Level.FINER)) 
            logger.logp(Level.FINE, className, mName, "No skip.  Rethrow", e);
            throw new BatchContainerRuntimeException(e);
        }

        if(logger.isLoggable(Level.FINER)) 
          logger.exiting(className, mName, e);
      }