killbill-memoizeit

Details

diff --git a/catalog/src/main/java/org/killbill/billing/catalog/api/user/DefaultCatalogUserApi.java b/catalog/src/main/java/org/killbill/billing/catalog/api/user/DefaultCatalogUserApi.java
index 8ece25c..5c6482d 100644
--- a/catalog/src/main/java/org/killbill/billing/catalog/api/user/DefaultCatalogUserApi.java
+++ b/catalog/src/main/java/org/killbill/billing/catalog/api/user/DefaultCatalogUserApi.java
@@ -52,7 +52,7 @@ import org.killbill.xmlloader.ValidationException;
 import org.killbill.xmlloader.XMLLoader;
 import org.xml.sax.SAXException;
 
-public class DefaultCatalogUserApi implements CatalogUserApi {
+public class  DefaultCatalogUserApi implements CatalogUserApi {
 
     private final CatalogService catalogService;
     private final InternalCallContextFactory internalCallContextFactory;
@@ -98,9 +98,9 @@ public class DefaultCatalogUserApi implements CatalogUserApi {
         } catch (final TenantApiException e) {
             throw new CatalogApiException(e);
         } catch (final ValidationException e) {
-            throw new CatalogApiException(ErrorCode.CAT_INVALID_FOR_TENANT, internalTenantContext.getTenantRecordId());
+            throw new CatalogApiException(e, ErrorCode.CAT_INVALID_FOR_TENANT, internalTenantContext.getTenantRecordId());
         } catch (final JAXBException e) {
-            throw new CatalogApiException(ErrorCode.CAT_INVALID_FOR_TENANT, internalTenantContext.getTenantRecordId());
+            throw new CatalogApiException(e, ErrorCode.CAT_INVALID_FOR_TENANT, internalTenantContext.getTenantRecordId());
         } catch (final IOException e) {
             throw new IllegalStateException(e);
         } catch (final TransformerException e) {
diff --git a/catalog/src/main/java/org/killbill/billing/catalog/io/VersionedCatalogLoader.java b/catalog/src/main/java/org/killbill/billing/catalog/io/VersionedCatalogLoader.java
index 82e8ec5..edfdf88 100644
--- a/catalog/src/main/java/org/killbill/billing/catalog/io/VersionedCatalogLoader.java
+++ b/catalog/src/main/java/org/killbill/billing/catalog/io/VersionedCatalogLoader.java
@@ -92,13 +92,13 @@ public class VersionedCatalogLoader implements CatalogLoader {
             return result;
         } catch (final ValidationException e) {
             logger.warn("Failed to load default catalog", e);
-            throw new CatalogApiException(ErrorCode.CAT_INVALID_DEFAULT, uriString);
+            throw new CatalogApiException(e, ErrorCode.CAT_INVALID_DEFAULT, uriString);
         } catch (final JAXBException e) {
             logger.warn("Failed to load default catalog", e);
-            throw new CatalogApiException(ErrorCode.CAT_INVALID_DEFAULT, uriString);
+            throw new CatalogApiException(e, ErrorCode.CAT_INVALID_DEFAULT, uriString);
         } catch(IllegalArgumentException e) {
             logger.warn("Failed to load default catalog", e);
-            throw new CatalogApiException(ErrorCode.CAT_INVALID_DEFAULT, uriString);
+            throw new CatalogApiException(e, ErrorCode.CAT_INVALID_DEFAULT, uriString);
         } catch (Exception e) {
             logger.warn("Failed to load default catalog", e);
             throw new IllegalStateException(e);
@@ -131,25 +131,25 @@ public class VersionedCatalogLoader implements CatalogLoader {
             XMLLoader.initializeAndValidate(uri, result);
             return result;
         } catch (final ValidationException e) {
-            logger.warn("Failed to load catalog for tenant='{}'",  tenantRecordId, e);
-            throw new CatalogApiException(ErrorCode.CAT_INVALID_FOR_TENANT, tenantRecordId);
+            logger.warn("Failed to load catalog for tenantRecordId='{}'",  tenantRecordId, e);
+            throw new CatalogApiException(e, ErrorCode.CAT_INVALID_FOR_TENANT, tenantRecordId);
         } catch (final JAXBException e) {
-            logger.warn("Failed to load catalog for tenant='{}'",  tenantRecordId, e);
-            throw new CatalogApiException(ErrorCode.CAT_INVALID_FOR_TENANT, tenantRecordId);
+            logger.warn("Failed to load catalog for tenantRecordId='{}'",  tenantRecordId, e);
+            throw new CatalogApiException(e, ErrorCode.CAT_INVALID_FOR_TENANT, tenantRecordId);
         } catch (final IOException e) {
-            logger.warn("Failed to load catalog for tenant='{}'",  tenantRecordId, e);
+            logger.warn("Failed to load catalog for tenantRecordId='{}'",  tenantRecordId, e);
             throw new IllegalStateException(e);
         } catch (final TransformerException e) {
-            logger.warn("Failed to load catalog for tenant='{}'",  tenantRecordId, e);
+            logger.warn("Failed to load catalog for tenantRecordId='{}'",  tenantRecordId, e);
             throw new IllegalStateException(e);
         } catch (final URISyntaxException e) {
-            logger.warn("Failed to load catalog for tenant='{}'",  tenantRecordId, e);
+            logger.warn("Failed to load catalog for tenantRecordId='{}'",  tenantRecordId, e);
             throw new IllegalStateException(e);
         } catch (final SAXException e) {
-            logger.warn("Failed to load catalog for tenant='{}'",  tenantRecordId, e);
+            logger.warn("Failed to load catalog for tenantRecordId='{}'",  tenantRecordId, e);
             throw new IllegalStateException(e);
         } catch (final InvalidConfigException e) {
-            logger.warn("Failed to load catalog for tenant='{}'",  tenantRecordId, e);
+            logger.warn("Failed to load catalog for tenantRecordId='{}'",  tenantRecordId, e);
             throw new IllegalStateException(e);
         }
     }