Add an error to an asynchronous span

 @param e [Exception] Add exception to the current span
 @param span [Span] the span for this Async op (previously returned
   from `log_async_entry`)
320595
def log_async_error(e, span)
      # Asynchronous spans can persist longer than the parent
      # trace.  With the trace ID, we check the current trace
      # but otherwise, we search staged traces.

      if tracing? && self.current_trace.id == span.context.trace_id
        self.current_trace.add_async_error(e, span)
      else
        trace = ::Instana.processor.staged_trace(span.context.trace_id)
        if trace
          trace.add_async_error(e, span)
        else
          ::Instana.logger.debug "#{__method__}: Couldn't find staged trace. #{span.inspect}"
        end
      end
    end
789361
public void put(E e) throws InterruptedException {
        if (e == null) throw new NullPointerException();
        // Note: convention in all put/take/etc is to preset local var
        // holding count negative to indicate failure unless set.
        int c = -1;
        Node<E> node = new Node<E>(e);
        final ReentrantLock putLock = this.putLock;
        final AtomicInteger count = this.count;
        putLock.lockInterruptibly();
        try {
            /*
             * Note that count is used in wait guard even though it is
             * not protected by lock. This works because count can
             * only decrease at this point (all other puts are shut
             * out by lock), and we (or some other waiting put) are
             * signalled if it ever changes from capacity. Similarly
             * for all other uses of count in other wait guards.
             */
            while (count.get() == capacity) {
                notFull.await();
            }
            enqueue(node);
            c = count.getAndIncrement();
            if (c + 1 < capacity)
                notFull.signal();
        } finally {
            putLock.unlock();
        }
        if (c == 0)
            signalNotEmpty();
    }
1147555
final void addError( ParsedElement parsedElement, ResourceKey errorMsg )
  {
    verify( parsedElement, false, errorMsg, EMPTY_ARRAY );
  }
950779
public void error(Throwable e) {
		out.println(new Date()+" ERROR:" +e.getMessage());
		e.printStackTrace(out);
	}
1315469
def on_error(self, ex):
        
        if self._d:
            self._d.errback()
            self._d = None
362687
private void abortWithError(Element element, String msg, Object... args) throws AbortProcessingException {
        error(element, msg, args);
        throw new AbortProcessingException();
    }
439883
def set_error(self, e):
        
        self.result = (False, e)
        self._lock.release()
541290
def add_error(e)
      @data[:error] = true

      if @data.key?(:ec)
        @data[:ec] = @data[:ec] + 1
      else
        @data[:ec] = 1
      end

      # If a valid exception has been passed in, log the information about it
      # In case of just logging an error for things such as HTTP client 5xx
      # responses, an exception/backtrace may not exist.
      if e
        if e.backtrace.is_a?(Array)
          add_stack(stack: e.backtrace)
        end

        if HTTP_SPANS.include?(@data[:n])
          set_tags(:http => { :error => "#{e.class}: #{e.message}" })
        else
          log(:error, Time.now, { :message => e.message, :parameters => e.class.to_s })
        end
        e.instance_variable_set(:@instana_logged, true)
      end
      self
    end
433088
protected void throwLazyError(Exception e)
    {
        if (e instanceof XMLStreamException) {
            WstxLazyException.throwLazily((XMLStreamException) e);
        }
        ExceptionUtil.throwRuntimeException(e);
    }
809164
public void addError(String field, String error) {
		Assert.notNull(field, "field must not be null");
		Assert.notNull(error, "field must not be null");

		addErrors(field, Collections.singletonList(error));

		addResultProperty(SUCCESS_PROPERTY, Boolean.FALSE);
	}
419117
async def on_error(self, event_method, *args, **kwargs):
        
        print('Ignoring exception in {}'.format(event_method), file=sys.stderr)
        traceback.print_exc()
1224303
protected void addError(String message, ASTNode node, SourceUnit source) {
        source.getErrorCollector().addErrorAndContinue(new SyntaxErrorMessage(new SyntaxException(
                message,  node.getLineNumber(), node.getColumnNumber(), node.getLastLineNumber(), node.getLastColumnNumber()
                ), source));
    }
1009526
synchronized void error(@NotNull Exception e) {
        if (isFinished) {
            throw new RuntimeException("Promise already completed!");
        }
        if (e == null) {
            throw new RuntimeException("Error can't be null");
        }
        isFinished = true;
        exception = e;
        deliverResult();
    }
163468
public static void error(Log log, Throwable e) {
		error(log, e, e.getMessage());
	}
93965
protected void whenInitializationErrorIsRaised(final EachTestNotifier notifier, final InitializationError e) {
        notifier.addFailure(new MultipleFailureException(e.getCauses()));
    }
476619
def _adorn_eof_error(self, e):
        
        if self.eof_error_hint:
            e.args = ('%s\n\n%s' % (e.args[0], self.eof_error_hint),)
230365
def log_async_info(kvs, span)
      # Asynchronous spans can persist longer than the parent
      # trace.  With the trace ID, we check the current trace
      # but otherwise, we search staged traces.

      if tracing? && self.current_trace.id == span.context.trace_id
        self.current_trace.add_async_info(kvs, span)
      else
        trace = ::Instana.processor.staged_trace(span.context.trace_id)
        if trace
          trace.add_async_info(kvs, span)
        else
          ::Instana.logger.debug "#{__method__}: Couldn't find staged trace. #{span.inspect}"
        end
      end
    end