This method sends an exception to the client and marks the reader
that a response has been sent to the client.

@param e The exception to send back
@param probeId The probe id.
505239
protected void sendErrorToClient(Throwable e, String probeId) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "sendErrorToClient", new Object[] { e, probeId });

        setComplete(true);
        setCurrentlyDoingReceiveWithWait(false);

        StaticCATHelper.sendExceptionToClient(e, probeId, conversation, requestNumber);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "sendErrorToClient");
    }
831774
private void probeChannel() {
    if (isStopped()) return;

    try {
      if (selector.selectNow() > 0) {
        final Iterator<SelectionKey> iterator = selector.selectedKeys().iterator();

        while (iterator.hasNext()) {
          final SelectionKey key = iterator.next();
          iterator.remove();

          if (key.isValid()) {
            if (key.isAcceptable()) {
              accept(key);
            }
          }
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
      logger().log("Failed to accept client channel for '" + name + "' because: " + e.getMessage(), e);
    }
  }
1303473
public void handleThrowable(Throwable e, Object target) {
        try {
            ExceptionCallback exceptionCallback = (ExceptionCallback) target;
            if (e instanceof Exception) {
                exceptionCallback.exceptionThrown((Exception) e);
            } else {
                exceptionCallback.exceptionThrown(new RuntimeException(e));
            }
        } catch (IllegalArgumentException | ClassCastException e1) {
            log.fatal("unable to provide callback for: " + target.toString(), e);
        }
    }
710079
public void onWarning(Exception e) {
    LOG.log(Level.WARNING, e.getMessage(), e);
  }
888681
protected void logException(CharSequence msg, Exception e) {
    System.err.println(msg + ":" + e.getMessage());
    e.printStackTrace();
  }
1312612
function(probeId, callback) {
      var t = this, probeImpl = t.runningProbesById[probeId];
      if (!probeImpl) {return callback('Probe not running');}
      if (--probeImpl.refCount === 0) {

        // Release probe resources & internal references if still no references after a while
        setTimeout(function() {
          if (probeImpl.refCount === 0) {
            try {
              probeImpl.release();
            } catch (e){}
            delete t.runningProbesByKey[probeImpl.probeKey];
            delete t.runningProbesById[probeId];
          }
        }, PROBE_TIMEOUT_MS);
      }
      callback(null, probeImpl);
    }
299821
public static void exception (TraceComponent tc, Exception e) {
    exception(null, tc, (Throwable)e);
  }
1294549
public void onError(Exception e) {
    LOG.log(Level.SEVERE, e.getMessage(), e);
  }
523300
private void throwQException(final QConnectorException e) {
		this.executor.execute(new Runnable() {
			
			@Override
			public void run() {
				QConnectorAsyncImpl.this.listener.exception(e);
			}
		});
	}
298938
public void sendError(HttpServletRequest request, HttpServletResponse response, ServletErrorReport e)
	{
		context.sendError(request, response, e);
	}
1250199
private void loadProbeValue(int probeId) {
        if (probeId <= 127) {
            mv.visitIntInsn(Opcodes.BIPUSH, probeId);
        } else if (probeId <= 32767) {
            mv.visitIntInsn(Opcodes.SIPUSH, probeId);
        } else {
            mv.visitLdcInsn(new Integer(probeId));
        }
    }
337263
public void run() {

    ResponseWrapper response = null;

    LOGGER.info("Received probe id: " + probe.getProbeId());

    // Only handle probes that we haven't handled before
    // The Probe Generator needs to send a stream of identical UDP packets
    // to compensate for UDP reliability issues. Therefore, the Responder
    // will likely get more than 1 identical probe. We should ignore
    // duplicates.
    if (!isProbeHandled(probe.getProbeId())) {

      if (this.noBrowser && probe.isNaked()) {
        LOGGER.warn("Responder set to noBrowser mode. Discarding naked probe with id [" + probe.getProbeId() + "]");
      } else {

        for (ProbeHandlerPlugin handler : handlers) {
          response = handler.handleProbeEvent(probe);
          if (!response.isEmpty()) {
            LOGGER.debug("Response to probe [" + probe.getProbeId() + "] includes " + response.numberOfServices());
            Iterator<RespondToURL> respondToURLs = probe.getRespondToURLs().iterator();

            if (probe.getRespondToURLs().isEmpty())
              LOGGER.warn("Processed probe [" + probe.getProbeId() + "] with no respondTo address. That's odd.");

            if (respondToURLs.hasNext()) {
              RespondToURL respondToURL = respondToURLs.next();
              // we are ignoring the label for now
              boolean success = sendResponse(respondToURL.url, probe.getRespondToPayloadType(), response);
              if (!success) {
                LOGGER.warn("Issue sending probe [" + probe.getProbeId() + "] response to [" + respondToURL.url + "]");
              }
            }

          } else {
            LOGGER.error("Response to probe [" + probe.getProbeId() + "] is empty.  Not sending empty response.");
          }
        }

      }

      markProbeAsHandled(probe.getProbeId());

      responder.probeProcessed();

    } else {
      LOGGER.info("Discarding duplicate/handled probe with id: " + probe.getProbeId());
    }
  }
967422
public void set(final Exception e) {
		if (this.value.compareAndSet(null, e)) {
			this.listeners.clear();
			this.cdl.countDown();
		}
	}
900909
protected final void sendError(Exception e, StaplerRequest req, StaplerResponse rsp) throws ServletException, IOException {
        sendError(e.getMessage(),req,rsp);
    }
1066504
public void exception(CharSequence message, Throwable e) {
    log(Level.SEVERE, message, e);
  }
358467
public void deliverAsyncException(Throwable e)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "deliverAsyncException", e);

      if (proxyQueue != null)
      {
         proxyQueue.deliverException(e);
      }
      else
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "** Odd - we are not async?!");
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "deliverAsyncException");
   }
609851
public void setText(Exception e) {
		StringWriter wr = new StringWriter();
		PrintWriter pr = new PrintWriter(wr);
		e.printStackTrace(pr);
		this.setText(wr.toString());
	}