public final static String UNEXPECTED_ERROR_MESSAGE = "This is an unexpected error.";
public final static String CONTACT_MESSAGE = System.getProperty("line.separator") + "Please contact EDIT Support (EditSupport@bgbm.org) with the error trace below (click on the 'Details' button).";
public final static String DEFAULT_MESSAGE = "Error thrown but no associated message";
+ public final static String CONNECTION_FAILURE_MESSAGE = "The connection to the remote server has been broken";
+ public final static String REMOTE_ACCESS_FAILURE_MESSAGE = "Problem accessing remote server";
/**
* Gets the Log4J logger for a given class
final Throwable t,
final List<String> contextInfo,
final String message,
- final MultiStatus status) {
+ final MultiStatus status,
+ final boolean showReason) {
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
String stackTraceWithContext = getStackTraceAndContextInfo(t, contextInfo);
- CdmErrorDialog ced = new CdmErrorDialog(AbstractUtility.getShell(), title, message, status, stackTraceWithContext);
+ CdmErrorDialog ced = new CdmErrorDialog(AbstractUtility.getShell(), title, message, status, stackTraceWithContext, showReason);
ced.open();
Class<? extends Object> clazz = source != null ? source.getClass() : this.getClass();
});
}
+ public static void errorDialog(final String title,
+ final Object source,
+ final String message,
+ final String pluginId,
+ final Throwable t,
+ boolean addContactMesg) {
+ errorDialog(title, source, message, pluginId, t, addContactMesg, true);
+
+ }
/**
* Displays a {@link eu.etaxonomy.taxeditor.model.CdmErrorDialog}.
*
final String message,
final String pluginId,
final Throwable t,
- boolean addContactMesg) {
+ boolean addContactMesg,
+ boolean showReason) {
Throwable throwable = t;
StringBuffer sbStackTrace = new StringBuffer();
throwable.toString(),
throwable);
- errorDialog(title, source, throwable, contextInfo, finalMessage, ms);
+ errorDialog(title, source, throwable, contextInfo, finalMessage, ms, showReason);
}
/**