migue/liferay-portal — pull request #87 by KocsisDaniel (2012-11-12 10:27:28+00:00)
Title: [TECH SUPPORT] LPS-30869

Hi Miguel,

Sergio asked me to send this to you because of Tika. The base problem is when we have encrypted documents in DL it throws a generic error with stack and the customer wants to see only a shorter and more specific message in the log. I am still not sure if we really wan't to commit this type of log changes, so please fell free to suggest new solution.

We already talked about the technical side and agreed on using the getCause method, however the in case of CryptographyException it is at the end of the wrapped exceptions chain so I left it. We could use later exceptions as well, but these are really generic ones and I think this solution is a bit better. Vilmos changed the TikaRawMetadataProcessor as well, because he found here could have the same exception. I am not familiar with the MetadataProcessor's so if you think it is not necessary to have these lines here, please feel free to remove.

thanks,
Daniel