public class

ExceptionUtil

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.ExceptionUtil

Summary

Public Constructors
ExceptionUtil()
Public Methods
static String getExceptionAsHtml(SearchException e)
static String getMessage(Throwable ex)
Extracts the closest thing to an end-user-comprehensible message from an exception.
static String logExceptionWithWarn(Logger log, String message, Throwable ex)
Logs the given exception.
static String logExceptionWithWarn(Logger log, String message, Throwable ex)
Logs the given exception.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ExceptionUtil ()

Public Methods

public static String getExceptionAsHtml (SearchException e)

public static String getMessage (Throwable ex)

Extracts the closest thing to an end-user-comprehensible message from an exception.

Parameters
ex exception to get message for.
Returns
  • string representing exception without stacktrace.

public static String logExceptionWithWarn (Logger log, String message, Throwable ex)

Logs the given exception.

Parameters
log the target logger
message the message to log
ex the exception to log
Returns
  • the logged message (not the given one)

public static String logExceptionWithWarn (Logger log, String message, Throwable ex)

Logs the given exception.

Parameters
log the target logger
message the message to log
ex the exception to log
Returns
  • the logged message (not the given one)