Project

General

Profile

Revision 633a72e4

ID633a72e4b335576e36c6dbacdf9bd36a32fa98cc
Parent 2d006ce7
Child ad53bf18

Added by Katja Luther over 2 years ago

do not throw an exception if metadata could not be loaded

View differences:

cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/media/ImageInfo.java
52 52

  
53 53
	public static ImageInfo NewInstanceWithMetaData(URI imageUri, Integer timeOut) throws IOException, HttpException {
54 54
		ImageInfo instance = NewInstance(imageUri, timeOut);
55

  
55 56
		instance.readMetaData(timeOut);
57

  
56 58
		return instance;
57 59
	}
58 60

  
......
130 132
		try {
131 133
			InputStream inputStream = UriUtils.getInputStream(imageUri);
132 134

  
133
			 IImageMetadata mediaData = Sanselan.getMetadata(inputStream, null);
135
			IImageMetadata mediaData = Sanselan.getMetadata(inputStream, null);
134 136

  
135 137
			if (mediaData != null){
136 138
				metaData = new HashMap<>();
......
147 149
					}
148 150
				}
149 151
			}
150
		} catch (ImageReadException e) {
152
		}
153
		catch (ImageReadException e) {
151 154
			logger.error("Could not read: " + imageUri + ". " + e.getMessage());
152
			throw new IOException(e);
155
			//throw new IOException(e);
153 156
		}
154 157
		return metaData;
155 158
	}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)