Log an error into the current span

 @param e [Exception] Add exception to the current span
334731
def add_error(e, span = nil)
      # Return if we've already logged this exception and it
      # is just propogating up the spans.
      return if e && e.instance_variable_get(:@instana_logged) || @current_span.nil?
      span ||= @current_span
      span.add_error(e)
    end
71413
public function exception(\Exception $e): void
    {
        $this->log(
            configDefault('exception', 'log', 'exception') ?: 'exception',
            dump($_REQUEST, 'REQUEST', true) . PHP_EOL . var_export($e, true)
        );
    }
1241501
public void recordParsingException(CqlTranslatorException e) {
        addException(e);
        if (shouldReport(e.getSeverity())) {
            CqlToElmError err = af.createCqlToElmError();
            err.setMessage(e.getMessage());
            err.setErrorType(e instanceof CqlSyntaxException ? ErrorType.SYNTAX : (e instanceof CqlSemanticException ? ErrorType.SEMANTIC : ErrorType.INTERNAL));
            err.setErrorSeverity(toErrorSeverity(e.getSeverity()));
            if (e.getLocator() != null) {
                err.setStartLine(e.getLocator().getStartLine());
                err.setEndLine(e.getLocator().getEndLine());
                err.setStartChar(e.getLocator().getStartChar());
                err.setEndChar(e.getLocator().getEndChar());
            }

            if (e.getCause() != null && e.getCause() instanceof CqlTranslatorIncludeException) {
                CqlTranslatorIncludeException incEx = (CqlTranslatorIncludeException) e.getCause();
                err.setTargetIncludeLibraryId(incEx.getLibraryId());
                err.setTargetIncludeLibraryVersionId(incEx.getVersionId());
                err.setErrorType(ErrorType.INCLUDE);
            }
            library.getAnnotation().add(err);
        }
    }
163468
public static void error(Log log, Throwable e) {
		error(log, e, e.getMessage());
	}
25883
protected static StringBuilder handleExceptionStart(Exception e) {
        LOG.warning(ExceptionUtils.getStackTrace(e));
        StringBuilder sb = new StringBuilder();
        if (e.getMessage() != null) {
            sb.append(e.getMessage()).append(". ");
        }
        if (e.getCause() != null && e.getCause().getMessage() != null) {
            sb.append(e.getCause().getMessage()).append(". ");
        }
        return sb;
    }
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
1031035
def on_Exception(self, e):
        

        if logging.getLogger(self.LOGGER_NAME).level == logging.DEBUG:
            import traceback

            traceback.print_exception(*sys.exc_info())
        else:
            from PyQt5 import QtCore

            sys.stderr.write("""An unexpected error occurred.
Check that you are using the latest version of PyQt5 and send an error report to
support@riverbankcomputing.com, including the following information:

  * your version of PyQt (%s)
  * the UI file that caused this error
  * the debug output of pyuic5 (use the -d flag when calling pyuic5)
""" % QtCore.PYQT_VERSION_STR)
929833
void log(Level level, String msg, Exception e) {
        if (e != null)
            logger.log(level, msg, e);
    }
1027466
final public function reportException(\Exception $e)
	{
		$this->_addRow(
			array($e->getMessage()),
			$this->_formatLocation($e->getFile(), $e->getLine()),
			self::WARN
		);
	}
628796
protected function logException( \Exception $e )
	{
		$logger = $this->context->getLogger();

		$logger->log( $e->getMessage(), \Aimeos\MW\Logger\Base::WARN, 'client/html' );
		$logger->log( $e->getTraceAsString(), \Aimeos\MW\Logger\Base::WARN, 'client/html' );
	}
1294549
public void onError(Exception e) {
    LOG.log(Level.SEVERE, e.getMessage(), e);
  }
740280
protected function addError(Exception $e) {
        $errors = $this->getErrors();
        $errors[] = $e;
        $this->setErrors($errors);
    }
820877
def log_errors!
      if AnyCable.config.debug?
        # Print error with backtrace in debug mode
        AnyCable.capture_exception do |e|
          AnyCable.logger.error("#{e.message}:\n#{e.backtrace.take(20).join("\n")}")
        end
      else
        AnyCable.capture_exception { |e| AnyCable.logger.error(e.message) }
      end
    end
876053
public void logError(final Level level, final String message, final Error e)
	{
		try {
			Logger errors = LoggingFactory
					.getLogger(LoggingFactory.NAME_ERROR_LOGGER);

			errors.logThrowable(level, message, e);

		}
		catch (LoggingException ex) {
			ex.printStackTrace();
		}

		if (logLevel.toInt() > level.toInt()) {
			return;
		}

		logThrowable(level, message, e);
	}
749347
public static function log(Exception $e)
    {
        Base::getLog()->error($e->getMessage(), [
            'code' => $e->getCode(),
            'file' => $e->getFile(),
            'line' => $e->getLine(),
        ]);
    }
1181352
protected void reportException(Exception e) {
        Assert.isNotNull(e);

        FindbugsPlugin.getDefault().logException(e, e.getLocalizedMessage());
        MessageDialog.openError(FindbugsPlugin.getShell(), "BugResolution failed.", e.getLocalizedMessage());
    }
710079
public void onWarning(Exception e) {
    LOG.log(Level.WARNING, e.getMessage(), e);
  }