From: Olivier Lamy Date: Mon, 31 Dec 2012 09:28:40 +0000 (+0000) Subject: preserve stack trace X-Git-Tag: archiva-1.4-M4~345 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5fd9dbe55f833142bf0dd5fbfe4d419afb12e4a7;p=archiva.git preserve stack trace git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427057 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java index d6ba50bee..8a83cc848 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java @@ -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 ); } diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index 4628006d5..f9e7dd830 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -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; diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java index 5cd8d6751..bc83da4c9 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java @@ -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; } } diff --git a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java index 58aad4b96..d266b528c 100644 --- a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java +++ b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java @@ -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); } } diff --git a/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/AuditEvent.java b/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/AuditEvent.java index 30d5f00f8..a73c6bc5c 100644 --- a/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/AuditEvent.java +++ b/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/AuditEvent.java @@ -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 ) diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java index 441d2e78c..890d57046 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java @@ -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 diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java index bdd3783bc..eaf2c10b0 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java @@ -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); } }