From 6125cccef0ec5fd14ca61e9e9faaa91482a77d49 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Tue, 13 Oct 2020 23:32:50 +0200 Subject: [PATCH] Minor improvements to ContentManagementException (FINERACT-1202) --- .../exception/ContentManagementException.java | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/ContentManagementException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/ContentManagementException.java index 8136f1547..7526b870a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/ContentManagementException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/ContentManagementException.java @@ -18,14 +18,12 @@ */ package org.apache.fineract.infrastructure.documentmanagement.exception; -import com.amazonaws.AmazonClientException; -import java.io.IOException; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; public class ContentManagementException extends AbstractPlatformDomainRuleException { public ContentManagementException(final String filename, final String message) { - super("error.msg.document.save", "Error while manipulating file " + filename + " due to a File system / Amazon S3 issue " + message, + super("error.msg.document.save", "Error while manipulating file " + filename + " due to a ContentRepository issue " + message, filename, message); } @@ -34,19 +32,8 @@ public class ContentManagementException extends AbstractPlatformDomainRuleExcept + fileSize / (1024 * 1024) + " MB exceeds the max permissable file size of " + maxFileSize + " MB", name, fileSize); } - public ContentManagementException(String filename, String message, IOException ioException) { - super("error.msg.document.save", "Error while manipulating file " + filename + " due to a File system / Amazon S3 issue " + message, - filename, message, ioException); + public ContentManagementException(String filename, String message, Exception exception) { + super("error.msg.document.save", "Error while manipulating file " + filename + " due to a ContentRepository issue " + message, + filename, message, exception); } - - public ContentManagementException(String filename, String message, AmazonClientException ace) { - super("error.msg.document.save", "Error while manipulating file " + filename + " due to a File system / Amazon S3 issue " + message, - filename, message, ace); - } - - public ContentManagementException(String filename, String message, ContentManagementException cme) { - super("error.msg.document.save", "Error while manipulating file " + filename + " due to a File system / Amazon S3 issue " + message, - filename, message, cme); - } - }