Project

General

Profile

« Previous | Next » 

Revision 41e2f693

Added by Cherian Mathew over 9 years ago

Moved all logging and dialog functionality to the new class MessagingUtils.
Refactoring code to adapt to above change.
Added new custom error dialog - CdmErrorDialog
Added runtime exception handling to the ApplicationWorkbenchAdvisor by adding a custom status handler

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java
45 45
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
46 46
import eu.etaxonomy.cdm.model.taxon.Taxon;
47 47
import eu.etaxonomy.taxeditor.store.CdmStore;
48
import eu.etaxonomy.taxeditor.store.StoreUtil;
49 48

  
50 49
/**
51 50
 * <p>DescriptionHelper class.</p>
......
134 133
			
135 134
		}
136 135
		if(element instanceof Distribution){
137
			StoreUtil.warn(DescriptionHelper.class, "trying to set cache on distribution, don't know what to do at the moment.");
136
			MessagingUtils.warn(DescriptionHelper.class, "trying to set cache on distribution, don't know what to do at the moment.");
138 137
			return;
139 138
		}
140
		StoreUtil.warn(DescriptionHelper.class, "No matching subclass found for DescriptionElementBase object, 'cache' not set.");
139
		MessagingUtils.warn(DescriptionHelper.class, "No matching subclass found for DescriptionElementBase object, 'cache' not set.");
141 140
	}
142 141
	
143 142
	/**
......
167 166
				return ((IdentifiableEntity) element).getTitleCache();
168 167
			}catch(LazyInitializationException e){
169 168
				String result = "No Session to initialize title cache for IdentifiableEntity";
170
				StoreUtil.error(DescriptionHelper.class, result, e);
169
				MessagingUtils.error(DescriptionHelper.class, result, e);
171 170
				return "TODO: " + result;
172 171
			}
173 172
		}
......
187 186
				return CdmUtils.concat("; ", new String[]{originalSource.getIdNamespace(), originalSource.getIdInSource(), sourceObjectTitle});
188 187
			}catch(LazyInitializationException e){
189 188
				String result = "Error initializing title cache for ISourceable of an OriginalSourceBase";
190
				StoreUtil.error(DescriptionHelper.class, result, e);
189
				MessagingUtils.error(DescriptionHelper.class, result, e);
191 190
				return "TODO: " + result;
192 191
			}
193 192
		}

Also available in: Unified diff