mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
104564: Merged DEV to HEAD-BUG-FIX (5.1/Cloud) 104487 : ACE-3949 : Non-specific message if maximumFileSizeLimit is exceeded - Added list of public exceptions git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@104638 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -91,6 +91,7 @@ public class RepositoryContainer extends AbstractRuntimeContainer
|
||||
private ThresholdOutputStreamFactory streamFactory = null;
|
||||
|
||||
private Class<?>[] notPublicExceptions = new Class<?>[] {};
|
||||
private Class<?>[] publicExceptions = new Class<?>[] {};
|
||||
|
||||
/*
|
||||
* Shame init is already used (by TenantRepositoryContainer).
|
||||
@@ -197,6 +198,25 @@ public class RepositoryContainer extends AbstractRuntimeContainer
|
||||
return notPublicExceptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exceptions which may contain information that need to display in UI
|
||||
*
|
||||
* @param publicExceptions - {@link Class}<?>[] instance which contains list of public exceptions
|
||||
*/
|
||||
public void setPublicExceptions(List<Class<?>> publicExceptions)
|
||||
{
|
||||
this.publicExceptions = new Class<?>[] {};
|
||||
if((null != publicExceptions) && !publicExceptions.isEmpty())
|
||||
{
|
||||
this.publicExceptions = publicExceptions.toArray(this.publicExceptions);
|
||||
}
|
||||
}
|
||||
|
||||
public Class<?>[] getPublicExceptions()
|
||||
{
|
||||
return publicExceptions;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.web.scripts.Container#getDescription()
|
||||
*/
|
||||
@@ -282,7 +302,8 @@ public class RepositoryContainer extends AbstractRuntimeContainer
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
Throwable hideCause = ExceptionStackUtil.getCause(e, notPublicExceptions);
|
||||
if (hideCause != null)
|
||||
Throwable displayCause = ExceptionStackUtil.getCause(e, publicExceptions);
|
||||
if (displayCause == null && hideCause != null)
|
||||
{
|
||||
AlfrescoRuntimeException alf = null;
|
||||
if (e instanceof AlfrescoRuntimeException)
|
||||
|
Reference in New Issue
Block a user