Build details message for an exception.

@param error
error to build message for
@return string with details message
171774
private String getDetails(Throwable error) {
		if (null == error) {
			return "";
		}
		StringBuilder content = new StringBuilder();
		content.append(error.getMessage());
		processStackTrace(error.getStackTrace(), content);
		content.append(getDetails(error.getCause()));
		return content.toString();
	}
1165976
def log_error(self, error, message, detail=None, strip=4):
        ""
        if message:
            msg = message + ": " + error
        else:
            msg = error

        tb = traceback.format_stack()
        if sys.version_info >= (3, 0):
            tb = tb[:-strip]
        else:
            tb = tb[strip:]

        self.errors.append({
            'message': msg,
            'traceback': tb,
            'detail': detail
        })
803400
private String getExceptionMessage(Throwable pException) {
        String message = pException.getLocalizedMessage();
        return pException.getClass().getName() + (message != null ? " : " + message : "");
    }
977996
def build_raw_error_message(protocol_exception):
    """"""
    message = ErrorMessage(
        id=protocol_exception.id,
        code=protocol_exception.code,
        tracing=protocol_exception.tracing,
        description=protocol_exception.description,
    )

    return message
60283
public static String convertExceptionToMessage(Throwable ex)
  {
    StringBuilder sb = new StringBuilder();
    if(ex != null)
    {
      sb.append("Exception type: ").append(ex.getClass().getName()).append("\n");
      sb.append("Message: ").append(ex.getLocalizedMessage()).append("\n");
      sb.append("Stacktrace: \n");
      StackTraceElement[] st = ex.getStackTrace();
      for (int i = 0; i < st.length; i++)
      {
        sb.append(st[i].toString());
        sb.append("\n");
      }
    }
    return sb.toString();
  }
1177677
public String getErrorMessage() {

        StringBuffer result = new StringBuffer(512);

        String reason = m_messages.key(Messages.GUI_REASON_0, new Object[] {});

        if (CmsStringUtil.isNotEmpty(m_errorMessage)) {
            result.append(m_errorMessage);
            result.append("\n").append(reason).append(": ");
        }

        // if a localized message is already set as a parameter, append it.
        result.append(getMessage(m_throwable));
        // recursively append all error reasons to the message
        for (Throwable cause = m_throwable.getCause(); cause != null; cause = cause.getCause()) {
            result.append("\n").append(reason).append(": ");
            result.append(getMessage(cause));
        }
        return result.toString();
    }
793566
protected String getErrorMessage(Exception e) {

		String ip;
		try {
			ip = InetAddress.getByName(server.split(":")[0]).getHostAddress();
		}
		catch (UnknownHostException e1) {
			ip = null;
			// throw new RuntimeException(e1.getMessage(), e1);
		}
		String message = "server:" + server + " ip:" + ip + " messsage:" + e.getMessage();
		logger.error(message);
		return message;
	}
1253530
protected String buildJobExceptionMessage(LaJobRuntime runtime, long before, Throwable cause) {
        final StringBuilder sb = new StringBuilder();
        sb.append("#flow #job Failed to run the job process:");
        sb.append(LF);
        sb.append("/= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =: ");
        sb.append(runtime.getJobType().getName());
        sb.append(LF).append(EX_IND);
        sb.append("jobRuntime=").append(runtime);
        setupExceptionMessageAccessContext(sb, runtime);
        setupExceptionMessageCallbackContext(sb, runtime);
        setupExceptionMessageVariousContext(sb, runtime, cause);
        setupExceptionMessageSqlCountIfExists(sb);
        setupExceptionMessageTransactionMemoriesIfExists(sb);
        setupExceptionMessageMailCountIfExists(sb);
        setupExceptionMessageRemoteApiCountIfExists(sb);
        final long after = System.currentTimeMillis();
        final String performanceView = toPerformanceView(before, after);
        sb.append(LF);
        sb.append("= = = = = = = = = =/ [").append(performanceView).append("] #").append(Integer.toHexString(cause.hashCode()));
        buildExceptionStackTrace(cause, sb);
        return sb.toString().trim();
    }
1196404
def error_details
      msg = ''
      @runner.failures.each do |checker|
        # msg << error("------- #{checker.name} -------") << "\n"
        # msg << error("#{checker.hint}") << "\n"
        checker.errors.details.each do |type, content|
          case type
          when :source
            content.each_line.with_index do |l, i|
              msg << yellow((i + 1).to_s.rjust(3)) << '|' << l
            end
          when Integer
            msg << info('Line: ') << yellow(type) << '|' << info(content)
          when Array
            msg << info('Pos: ') << yellow(type.join(',')) << '|' << info(content)
          when nil
            msg << info(content)
          end
          msg << "\n"
        end
      end
      msg
    end
1233104
private String[] buildException(int exceptionLine) {
    if (exceptionLine == -1) {
      return emptyException;
    }
    String[] exception = new String[additionalLines.size() - exceptionLine - 1];
    for (int i = 0; i < exception.length; i++) {
      exception[i] = (String) additionalLines.get(i + exceptionLine);
    }
    return exception;
  }
454548
public static String formatErrors(Iterable<SoyError> errors) {
    int numErrors = 0;
    int numWarnings = 0;
    for (SoyError error : errors) {
      if (error.isWarning()) {
        numWarnings++;
      } else {
        numErrors++;
      }
    }
    if (numErrors + numWarnings == 0) {
      throw new IllegalArgumentException("cannot format 0 errors");
    }
    StringBuilder sb =
        new StringBuilder(numErrors == 0 ? "warnings" : "errors")
            .append(" during Soy compilation\n");
    Joiner.on('\n').appendTo(sb, errors);
    if (numErrors > 0) {
      formatNumber(numErrors, "error", sb);
    }
    if (numWarnings > 0) {
      if (numErrors > 0) {
        sb.append(' ');
      }
      formatNumber(numWarnings, "warning", sb);
    }
    return sb.append('\n').toString();
  }
94509
private static String getExceptionMessage(final String[] exception) {
        StringBuffer buff = new StringBuffer();
        for (int i = 0; i < exception.length; i++) {
            buff.append(exception[i]);
        }
        return buff.toString();
    }
975995
private Exception updateErrorMsg(StringBuilder pErrors, Exception exp) {
        pErrors.append(exp.getClass()).append(": ").append(exp.getMessage()).append("\n");
        return exp;
    }
480393
protected String error2message(IApiError err) {
		if (err != null) {
			StringBuilder sb = new StringBuilder(err.toString());
			if (Str.STR.notNullOrEmpty(err.param())) {
				sb.append(" (").append(err.param()).append(")");
			}
			return sb.toString();
		}
		return new GenericApiError().toString();
	}
865155
private static String buildMessage(String parameterName, String methodName) {

        ResourceBundle rb = ResourceBundle.getBundle("org.apache.beehive.controls.system.jdbc.parser.strings", Locale.getDefault() );
        String pattern = rb.getString("jdbccontrol.invalid.param");
        return MessageFormat.format(pattern, parameterName, methodName);
    }
334470
def handle_build_exception(exception):
    
    error('Build failed: {}'.format(exception.message))
    if exception.instructions is not None:
        info('Instructions: {}'.format(exception.instructions))
    exit(1)
310087
public String getMessage(final String code) {
        assert code != null;
        
        MissingResourceException error = null;
        
        ResourceBundle[] bundles = getBundles();
        
        for (int i=0; i<bundles.length; i++) {
            try {
                return bundles[i].getString(code);
            }
            catch (MissingResourceException e) {
                //
                // FIXME: For now just save the first error, should really roll a new message with all of the details
                //
                
                if (error != null) {
                    error = e;
                }
            }
        }
        
        assert error != null;
        
        throw error;
    }