preserve stack trace

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-31 09:28:40 +00:00
parent 8bfc53c7e6
commit 5fd9dbe55f
7 changed files with 13 additions and 11 deletions

View File

@ -705,7 +705,7 @@ public class DefaultArchivaConfiguration
catch ( EvaluatorException e )
{
throw new RuntimeException(
"Unable to evaluate expressions found in " + "userConfigFilename or altConfigFilename." );
"Unable to evaluate expressions found in " + "userConfigFilename or altConfigFilename.", e);
}
registry.addChangeListener( this );
}

View File

@ -339,7 +339,7 @@ public class DefaultManagedRepositoryAdmin
}
catch ( Exception e )
{
throw new RepositoryAdminException( "Error saving configuration for delete action" + e.getMessage() );
throw new RepositoryAdminException( "Error saving configuration for delete action" + e.getMessage(), e);
}
return Boolean.TRUE;

View File

@ -333,15 +333,17 @@ public class DownloadRemoteIndexTask
}
catch ( AuthorizationException e )
{
throw new IOException( e.getMessage() );
throw new IOException( e.getMessage(), e );
}
catch ( TransferFailedException e )
{
throw new IOException( e.getMessage() );
throw new IOException( e.getMessage(), e );
}
catch ( ResourceDoesNotExistException e )
{
throw new FileNotFoundException( e.getMessage() );
FileNotFoundException fnfe = new FileNotFoundException( e.getMessage() );
fnfe.initCause( e );
throw fnfe;
}
}

View File

@ -202,7 +202,7 @@ public class DefaultUserRepositories
}
catch ( AuthorizationException e )
{
throw new ArchivaSecurityException( e.getMessage() );
throw new ArchivaSecurityException( e.getMessage(), e);
}
}
@ -219,7 +219,7 @@ public class DefaultUserRepositories
}
catch ( AuthorizationException e )
{
throw new ArchivaSecurityException( e.getMessage() );
throw new ArchivaSecurityException( e.getMessage(), e);
}
}

View File

@ -151,7 +151,7 @@ public class AuditEvent
}
catch ( ParseException e )
{
throw new IllegalArgumentException( "Improperly formatted timestamp for audit log event: " + ts );
throw new IllegalArgumentException( "Improperly formatted timestamp for audit log event: " + ts, e);
}
if ( name.length() > TS_LENGTH )

View File

@ -226,7 +226,7 @@ public class Maven2RepositoryPathTranslator
{
throw new IllegalArgumentException( "Not a valid artifact path in a Maven 2 repository, filename '" + id
+ "' doesn't contain a timestamped version matching snapshot '"
+ projectVersion + "'" );
+ projectVersion + "'", e);
}
}
else

View File

@ -378,7 +378,7 @@ public class Maven2RepositoryStorage
}
catch ( RepositoryAdminException e )
{
throw new RepositoryStorageRuntimeException( "repo-admin", e.getMessage() );
throw new RepositoryStorageRuntimeException( "repo-admin", e.getMessage(), e);
}
}
@ -524,7 +524,7 @@ public class Maven2RepositoryStorage
}
catch ( RepositoryAdminException e )
{
throw new RepositoryStorageRuntimeException( "repo-admin", e.getMessage() );
throw new RepositoryStorageRuntimeException( "repo-admin", e.getMessage(), e);
}
}