Include throwable cause in TransformException (#330)

Thanks @marsv024 for your contribution. The suggested changes have been verified and will be now merge into master.
This commit is contained in:
Marcus Svartmark 2021-02-16 17:14:50 +01:00 committed by GitHub
parent 58adc39afc
commit e976338c84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,11 +76,11 @@ public interface Transformer
}
catch (IllegalArgumentException e)
{
throw new TransformException(BAD_REQUEST.value(), getMessage(e));
throw new TransformException(BAD_REQUEST.value(), getMessage(e), e);
}
catch (Exception e)
{
throw new TransformException(INTERNAL_SERVER_ERROR.value(), getMessage(e));
throw new TransformException(INTERNAL_SERVER_ERROR.value(), getMessage(e), e);
}
if (!targetFile.exists())
{