Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

123025 gjames: RA-757: Handle integrity exceptions


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126522 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 11:19:41 +00:00
parent 8e27cb0de1
commit 1e4f80cb61
8 changed files with 126 additions and 21 deletions

View File

@@ -25,6 +25,7 @@ import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.node.integrity.IntegrityException;
import org.alfresco.repo.tenant.TenantUtil;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
@@ -146,17 +147,9 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
}
}
catch (IntegrityException intException)
catch (AlfrescoRuntimeException | ApiException | WebScriptException xception )
{
renderErrorResponse(resolveException(intException), res);
}
catch (ApiException apiException)
{
renderErrorResponse(resolveException(apiException), res);
}
catch (WebScriptException webException)
{
renderErrorResponse(resolveException(webException), res);
renderErrorResponse(resolveException(xception), res);
}
catch (RuntimeException runtimeException)
{

View File

@@ -161,7 +161,7 @@ public abstract class ApiWebScript extends AbstractWebScript
}
}
private Api determineApi(Map<String, String> templateVars)
public Api determineApi(Map<String, String> templateVars)
{
String apiScope = templateVars.get("apiScope");
String apiVersion = templateVars.get("apiVersion");