Project

General

Profile

« Previous | Next » 

Revision 1b9ae425

Added by Cherian Mathew over 9 years ago

MessagingUtils : added option for displaying contact message in the error dialog
ApplicationWorkbenchAdvisor : using new method with contact message
AbstractBulkEditorInput : added errorDialog for MergeException

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java
193 193
			final Object source,
194 194
			final String message,
195 195
			final String pluginId,			
196
			final Throwable t) {
196
			final Throwable t,
197
			boolean addContactMesg) {
197 198
		// Usually the status contains only the first line of the stack trace.
198 199
		// For the unexpected messages we need the entire stack trace so we 
199 200
		// create a new status with the entire stacktrace	
200 201
		StringWriter sw = new StringWriter();
201 202
		t.printStackTrace(new PrintWriter(sw));
203
		String finalMessage = t.getMessage();
204
		if(addContactMesg) {
205
			finalMessage += MessagingUtils.CONTACT_MESSAGE;
206
		}
202 207
		IStatus status = new Status(IStatus.ERROR, 
203 208
				pluginId, 
204
				t.getMessage(), 
209
				finalMessage, 
205 210
				new Exception(sw.toString()));	 
206 211
		errorDialog(title, source, message, status);
207 212
	}
208 213
	
214

  
215
	
209 216
	/**
210 217
	 * Displays a {@link eu.etaxonomy.taxeditor.model.CdmErrorDialog}.
211 218
	 *
......
222 229
			final IStatus status,
223 230
			final boolean showStackTrace) {	    	    
224 231
		if(showStackTrace && status.getException() != null) {	    			    		
225
			errorDialog(title, source,  status.getPlugin(), message, status.getException());
232
			errorDialog(title, source,  status.getPlugin(), message, status.getException(),true);
226 233
		} else {
227 234
			errorDialog(title, source, message, status);
228 235
		}	    		
......
283 290
		        	warningDialog(title, source, String.format("You are missing sufficient permissions for the operation \"%s\". %s", operationlabel, hint));
284 291
		        } else {
285 292
		        	title = "Error executing operation";		        	
286
		        	errorDialog(title, source, String.format("An error occured while executing %s. %s", operationlabel, hint), PID, ex);
293
		        	errorDialog(title, source, String.format("An error occured while executing %s. %s", operationlabel, hint), PID, ex, true);
287 294
		        	
288 295
		        }
289 296
		        

Also available in: Unified diff