mirror of https://github.com/apache/archiva.git
[MRM-430] fix error display
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@562505 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a84578e55b
commit
83dfd74838
|
@ -585,10 +585,12 @@ public class ConfigureProxyConnectorAction
|
|||
catch ( RegistryException e )
|
||||
{
|
||||
addActionError( "Unable to save configuration: " + e.getMessage() );
|
||||
return INPUT;
|
||||
}
|
||||
catch ( IndeterminateConfigurationException e )
|
||||
{
|
||||
addActionError( e.getMessage() );
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
|
|
|
@ -216,10 +216,12 @@ public class ConfigureNetworkProxyAction
|
|||
catch ( RegistryException e )
|
||||
{
|
||||
addActionError( "Unable to save configuration: " + e.getMessage() );
|
||||
return INPUT;
|
||||
}
|
||||
catch ( IndeterminateConfigurationException e )
|
||||
{
|
||||
addActionError( e.getMessage() );
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
|
|
|
@ -113,6 +113,7 @@ public class ConfigureRepositoryAction
|
|||
return ERROR;
|
||||
}
|
||||
|
||||
String result = SUCCESS;
|
||||
if ( StringUtils.equals( mode, "delete-entry" ) || StringUtils.equals( mode, "delete-contents" ) )
|
||||
{
|
||||
AdminRepositoryConfiguration existingRepository = getRepository();
|
||||
|
@ -127,33 +128,40 @@ public class ConfigureRepositoryAction
|
|||
try
|
||||
{
|
||||
removeRepository( getRepoid() );
|
||||
removeRepositoryRoles( existingRepository );
|
||||
saveConfiguration();
|
||||
result = saveConfiguration();
|
||||
|
||||
if ( result.equals( SUCCESS ) )
|
||||
{
|
||||
removeRepositoryRoles( existingRepository );
|
||||
if ( StringUtils.equals( mode, "delete-contents" ) )
|
||||
{
|
||||
removeContents( existingRepository );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
addActionError( "Unable to delete repository: " + e.getMessage() );
|
||||
result = INPUT;
|
||||
}
|
||||
catch ( RoleManagerException e )
|
||||
{
|
||||
addActionError( "Unable to delete repository: " + e.getMessage() );
|
||||
result = INPUT;
|
||||
}
|
||||
catch ( InvalidConfigurationException e )
|
||||
{
|
||||
addActionError( "Unable to delete repository: " + e.getMessage() );
|
||||
result = INPUT;
|
||||
}
|
||||
catch ( RegistryException e )
|
||||
{
|
||||
addActionError( "Unable to delete repository: " + e.getMessage() );
|
||||
result = INPUT;
|
||||
}
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
return result;
|
||||
}
|
||||
|
||||
public String edit()
|
||||
|
@ -236,29 +244,34 @@ public class ConfigureRepositoryAction
|
|||
removeRepository( repoId );
|
||||
}
|
||||
|
||||
String result;
|
||||
try
|
||||
{
|
||||
addRepository( getRepository() );
|
||||
saveConfiguration();
|
||||
result = saveConfiguration();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
addActionError( "I/O Exception: " + e.getMessage() );
|
||||
result = INPUT;
|
||||
}
|
||||
catch ( RoleManagerException e )
|
||||
{
|
||||
addActionError( "Role Manager Exception: " + e.getMessage() );
|
||||
result = INPUT;
|
||||
}
|
||||
catch ( InvalidConfigurationException e )
|
||||
{
|
||||
addActionError( "Invalid Configuration Exception: " + e.getMessage() );
|
||||
result = INPUT;
|
||||
}
|
||||
catch ( RegistryException e )
|
||||
{
|
||||
addActionError( "Configuration Registry Exception: " + e.getMessage() );
|
||||
result = INPUT;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean validateFields( String mode )
|
||||
|
@ -412,6 +425,7 @@ public class ConfigureRepositoryAction
|
|||
catch ( IndeterminateConfigurationException e )
|
||||
{
|
||||
addActionError( e.getMessage() );
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
|
|
|
@ -258,7 +258,7 @@
|
|||
|
||||
<action name="saveRepository" class="configureRepositoryAction" method="save">
|
||||
<result name="success" type="redirect-action">repositories</result>
|
||||
<result name="input">/WEB-INF/jsp/admin/addRepository.jsp</result>
|
||||
<result name="input">/WEB-INF/jsp/admin/editRepository.jsp</result>
|
||||
<result name="error">/WEB-INF/jsp/admin/editRepository.jsp</result>
|
||||
<interceptor-ref name="configuredPrepareParamsStack"/>
|
||||
</action>
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
<h1>Admin: Delete Network Proxy</h1>
|
||||
|
||||
<ww:actionerror/>
|
||||
|
||||
<div id="contentArea">
|
||||
|
||||
<h2>Delete Network Proxy</h2>
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
<h1>Admin: Delete Proxy Connector</h1>
|
||||
|
||||
<ww:actionerror/>
|
||||
|
||||
<div id="contentArea">
|
||||
|
||||
<h2>Delete Proxy Connector</h2>
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
<h1>Admin: Delete Repository</h1>
|
||||
|
||||
<ww:actionerror/>
|
||||
|
||||
<div id="contentArea">
|
||||
|
||||
<h2>Delete Repository</h2>
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
<h1>Admin: Edit Repository</h1>
|
||||
|
||||
<ww:actionerror/>
|
||||
|
||||
<div id="contentArea">
|
||||
|
||||
<h2>Edit Repository</h2>
|
||||
|
|
Loading…
Reference in New Issue