Revision 9b51395d
Added by Patrick Plitzner over 8 years ago
- commented error logging for ImageInfo loading (#4385)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationElement.java | ||
---|---|---|
17 | 17 |
import org.apache.http.HttpException; |
18 | 18 |
import org.eclipse.swt.events.SelectionListener; |
19 | 19 |
|
20 |
import eu.etaxonomy.cdm.common.UriUtils; |
|
20 | 21 |
import eu.etaxonomy.cdm.common.media.ImageInfo; |
21 | 22 |
import eu.etaxonomy.cdm.model.media.ImageFile; |
22 | 23 |
import eu.etaxonomy.cdm.model.media.MediaRepresentation; |
23 | 24 |
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart; |
24 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
25 | 25 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
26 | 26 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
27 | 27 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
... | ... | |
109 | 109 |
ImageFile imageFile = (ImageFile) mediaRepresentationPart; |
110 | 110 |
|
111 | 111 |
URI uri = imageFile.getUri(); |
112 |
if(uri == null){
|
|
112 |
if(!UriUtils.isServiceAvailable(uri)){
|
|
113 | 113 |
return; |
114 | 114 |
} |
115 | 115 |
try { |
... | ... | |
119 | 119 |
getEntity().setMimeType(mimeType); |
120 | 120 |
text_suffix.setText(imageInfo.getSuffix()); |
121 | 121 |
getEntity().setSuffix(imageInfo.getSuffix()); |
122 |
} catch (IOException e) { |
|
123 |
MessagingUtils.error(getClass(), e); |
|
124 |
} catch (HttpException e) { |
|
125 |
MessagingUtils.error(getClass(), e); |
|
122 |
} |
|
123 |
//theses exceptions do not need to be logged |
|
124 |
//especially because this happens with every key stroke |
|
125 |
catch (IOException e) { |
|
126 |
// MessagingUtils.error(getClass(), e); |
|
127 |
} |
|
128 |
catch (HttpException e) { |
|
129 |
// MessagingUtils.error(getClass(), e); |
|
126 | 130 |
} |
127 | 131 |
} |
128 | 132 |
} |
Also available in: Unified diff