]> source.dussan.org Git - archiva.git/commitdiff
preserve stack trace
authorOlivier Lamy <olamy@apache.org>
Mon, 31 Dec 2012 09:28:40 +0000 (09:28 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 31 Dec 2012 09:28:40 +0000 (09:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427057 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java
archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java
archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/AuditEvent.java
archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java
archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java

index d6ba50beedb843a658d07ddbf71c4762f8ac605c..8a83cc84825f9999a1770fd92c9825ba79fcfeaf 100644 (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 );
     }
index 4628006d58e39408abc2a724167124b7ab5e7ea2..f9e7dd8305ec19f848f46880e1c54eb31d34d4cc 100644 (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;
index 5cd8d6751de44d48d345dadb5425a0db91ddf5bc..bc83da4c926190300270cc86e2af3ecdb8fffff5 100644 (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;
             }
         }
 
index 58aad4b96fd81be718fb43370f278b718ba9ad97..d266b528c1937dc577e84f864ce490abb88aa1c6 100644 (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);
         }
     }
 
index 30d5f00f80278da0fed62cbe2284ef92d3ba1318..a73c6bc5cbf40f927cd8e77033f642e3f4c94fe5 100644 (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 )
index 441d2e78c14272c610e26745ce6f060d42b155e2..890d57046dbade4012bd32e77cabcf308b2e0e5c 100644 (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
index bdd3783bcb91e03edbeea39d55edccb9ac94189b..eaf2c10b0ed7d8a78d9a55d08e71de7bd35d1dab 100644 (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);
         }
     }