Avoid duplicate logging of propagated exception.

This commit is contained in:
Sidhesh Mhatre 2015-07-30 10:48:55 -04:00
parent 9a9255b2a8
commit d75ad1b21f

View File

@ -72,7 +72,6 @@ class AbstractFileChunk {
try { try {
sanitizedContent = this.charsetDecoder.decode(ByteBuffer.wrap(content)).toString().getBytes(); sanitizedContent = this.charsetDecoder.decode(ByteBuffer.wrap(content)).toString().getBytes();
} catch (CharacterCodingException ex) { } catch (CharacterCodingException ex) {
logger.log(Level.WARNING, "Error sanitizing the " + ByteBuffer.wrap(content).toString(), ex);
throw new IngesterException(NbBundle.getMessage(this.getClass(), "AbstractFileChunk.index.charCodingException.msg", parent.getSourceFile().getName()), ex); throw new IngesterException(NbBundle.getMessage(this.getClass(), "AbstractFileChunk.index.charCodingException.msg", parent.getSourceFile().getName()), ex);
} }
ByteContentStream bcs = new ByteContentStream(sanitizedContent, sanitizedContent.length, parent.getSourceFile(), indexCharset); ByteContentStream bcs = new ByteContentStream(sanitizedContent, sanitizedContent.length, parent.getSourceFile(), indexCharset);