Yeah, looking at this again, I think it might be better to use a different exception type instead. I'll update them.. Thanks for the suggestion :)
-Deng On Mon, May 2, 2011 at 9:44 AM, Brett Porter <br...@apache.org> wrote: > Doesn't this lose valuable exception information? Perhaps a different > exception type needs to be used, or at least have it logged at error level > if it's not recoverable? > > - Brett > > On 01/05/2011, at 1:43 PM, och...@apache.org wrote: > > > Author: oching > > Date: Sun May 1 03:43:14 2011 > > New Revision: 1098215 > > > > URL: http://svn.apache.org/viewvc?rev=1098215&view=rev > > Log: > > update IOException construction to make it compile for java 1.5 (while > not yet agreed whether to set npanday to 1.6) > > > > Modified: > > > > incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java > > > > incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/NetDependenciesRepositoryImpl.java > > > > incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/AssemblyPluginsRepository.java > > > > incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/DefaultAssemblyInfoMarshaller.java > > > > incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java > > > > incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java > > > > incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java > > > > incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java > > > > incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/impl/ConfigurationAppendersRepository.java > > > > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/ConnectionsRepository.java > > > > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/RepositoryRegistryImpl.java > > > > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/StandardRepositoryLoader.java > > > > incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/SettingsRepository.java > > > > Modified: > incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java > Sun May 1 03:43:14 2011 > > @@ -195,12 +195,12 @@ public class ArtifactInstallerImpl > > catch ( ArtifactResolutionException e ) > > { > > throw new IOException( > > - "NPANDAY-001-000: Problem resolving artifact for > java binding: Message = " + e.getMessage(), e); > > + "NPANDAY-001-000: Problem resolving artifact for > java binding: Message = " + e.getMessage() ); > > } > > catch ( ArtifactNotFoundException e ) > > { > > throw new IOException( > > - "NPANDAY-001-001: Could not find artifact for > java binding: Message =" + e.getMessage(), e); > > + "NPANDAY-001-001: Could not find artifact for > java binding: Message =" + e.getMessage() ); > > } > > } > > } > > @@ -218,12 +218,12 @@ public class ArtifactInstallerImpl > > catch ( ArtifactResolutionException e ) > > { > > throw new IOException( > > - "NPANDAY-001-002: Problem resolving java dependency > artifact: Message = " + e.getMessage(), e); > > + "NPANDAY-001-002: Problem resolving java dependency > artifact: Message = " + e.getMessage() ); > > } > > catch ( ArtifactNotFoundException e ) > > { > > throw new IOException( > > - "NPANDAY-001-003: Could not find java dependency > artifact: Message = " + e.getMessage(), e); > > + "NPANDAY-001-003: Could not find java dependency > artifact: Message = " + e.getMessage() ); > > } > > } > > > > @@ -303,7 +303,7 @@ public class ArtifactInstallerImpl > > { > > throw new ArtifactInstallationException( > "NPANDAY-001-006: Failed to install artifact: ID = " + > > artifact.getId() + ", File = " + > > - ( ( artifact.getFile() != null ) ? > artifact.getFile().getAbsolutePath() : "" ), e ); > > + ( ( artifact.getFile() != null ) ? > artifact.getFile().getAbsolutePath() : "" ) ); > > } > > } > > > > > > Modified: > incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/NetDependenciesRepositoryImpl.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/NetDependenciesRepositoryImpl.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/NetDependenciesRepositoryImpl.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/NetDependenciesRepositoryImpl.java > Sun May 1 03:43:14 2011 > > @@ -86,7 +86,7 @@ public class NetDependenciesRepositoryIm > > } > > catch ( XmlPullParserException e ) > > { > > - throw new IOException( "NPANDAY-003-000: Could not read > net-dependencies.xml", e ); > > + throw new IOException( "NPANDAY-003-000: Could not read > net-dependencies.xml" ); > > } > > netDependencies = model.getNetDependencies(); > > String npandayVersion = (String) properties.get( > "npanday.version" ); > > > > Modified: > incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/AssemblyPluginsRepository.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/AssemblyPluginsRepository.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/AssemblyPluginsRepository.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/AssemblyPluginsRepository.java > Sun May 1 03:43:14 2011 > > @@ -74,7 +74,7 @@ public final class AssemblyPluginsReposi > > } > > catch ( XmlPullParserException e ) > > { > > - throw new IOException( "NPANDAY-021-000: Could not read > plugins-compiler.xml", e ); > > + throw new IOException( "NPANDAY-021-000: Could not read > plugins-compiler.xml" ); > > } > > assemblyPlugins = plugins.getAssemblyPlugins(); > > Set languages = getAssemblyPluginLanguages(); > > > > Modified: > incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/DefaultAssemblyInfoMarshaller.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/DefaultAssemblyInfoMarshaller.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/DefaultAssemblyInfoMarshaller.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-assembler/src/main/java/npanday/assembler/impl/DefaultAssemblyInfoMarshaller.java > Sun May 1 03:43:14 2011 > > @@ -108,7 +108,7 @@ final class DefaultAssemblyInfoMarshalle > > } > > catch ( IOException e ) > > { > > - throw new IOException( "NPANDAY-022-000: Failed to generate > AssemblyInfo", e ); > > + throw new IOException( "NPANDAY-022-000: Failed to generate > AssemblyInfo" ); > > } > > finally > > { > > > > Modified: > incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java > Sun May 1 03:43:14 2011 > > @@ -132,7 +132,7 @@ public final class ProjectFactory > > } > > catch ( XmlPullParserException e ) > > { > > - throw new IOException( "NPANDAY-180-000: Unable to > read model: Message = " + e.getMessage(), e ); > > + throw new IOException( "NPANDAY-180-000: Unable to > read model: Message = " + e.getMessage() ); > > > > } > > //Project parentProject = createProjectFrom( parentModel, > parentPomFile.getParentFile() ); > > > > Modified: > incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java > Sun May 1 03:43:14 2011 > > @@ -175,15 +175,15 @@ public final class ProjectDaoImpl > > } > > catch ( RepositoryException e ) > > { > > - throw new IOException( "NPANDAY-180-000: Message = " + > e.getMessage(), e ); > > + throw new IOException( "NPANDAY-180-000: Message = " + > e.getMessage() ); > > } > > catch ( MalformedQueryException e ) > > { > > - throw new IOException( "NPANDAY-180-001: Message = " + > e.getMessage(), e ); > > + throw new IOException( "NPANDAY-180-001: Message = " + > e.getMessage() ); > > } > > catch ( QueryEvaluationException e ) > > { > > - throw new IOException( "NPANDAY-180-002: Message = " + > e.getMessage(), e ); > > + throw new IOException( "NPANDAY-180-002: Message = " + > e.getMessage() ); > > } > > finally > > { > > @@ -351,15 +351,15 @@ public final class ProjectDaoImpl > > } > > catch ( QueryEvaluationException e ) > > { > > - throw new IOException( "NPANDAY-180-005: Message = " + > e.getMessage(), e); > > + throw new IOException( "NPANDAY-180-005: Message = " + > e.getMessage() ); > > } > > catch ( RepositoryException e ) > > { > > - throw new IOException( "NPANDAY-180-006: Message = " + > e.getMessage(), e); > > + throw new IOException( "NPANDAY-180-006: Message = " + > e.getMessage() ); > > } > > catch ( MalformedQueryException e ) > > { > > - throw new IOException( "NPANDAY-180-007: Message = " + > e.getMessage(), e); > > + throw new IOException( "NPANDAY-180-007: Message = " + > e.getMessage() ); > > } > > finally > > { > > @@ -857,7 +857,7 @@ public final class ProjectDaoImpl > > > > } > > } > > - throw new IOException( "NPANDAY-180-021: Could not open RDF > Repository: Message =" + e.getMessage(), e); > > + throw new IOException( "NPANDAY-180-021: Could not open RDF > Repository: Message =" + e.getMessage() ); > > } > > > > for ( Model model : modelDependencies ) > > > > Modified: > incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java > Sun May 1 03:43:14 2011 > > @@ -67,7 +67,7 @@ public final class CompilerPluginsReposi > > } > > catch ( XmlPullParserException e ) > > { > > - throw new IOException( "NPANDAY-062-000: Could not read > plugins-compiler.xml", e ); > > + throw new IOException( "NPANDAY-062-000: Could not read > plugins-compiler.xml" ); > > } > > compilerPlugins = plugins.getCompilerPlugins(); > > } > > > > Modified: > incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java > Sun May 1 03:43:14 2011 > > @@ -70,7 +70,7 @@ public final class ExecutablePluginsRepo > > } > > catch ( XmlPullParserException e ) > > { > > - throw new IOException( "NPANDAY-067-000: Could not read > executable-plugins.xml", e ); > > + throw new IOException( "NPANDAY-067-000: Could not read > executable-plugins.xml" ); > > } > > executablePlugins = plugins.getExecutablePlugins(); > > } > > > > Modified: > incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/impl/ConfigurationAppendersRepository.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/impl/ConfigurationAppendersRepository.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/impl/ConfigurationAppendersRepository.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/impl/ConfigurationAppendersRepository.java > Sun May 1 03:43:14 2011 > > @@ -51,7 +51,7 @@ public class ConfigurationAppendersRepos > > } > > catch ( XmlPullParserException e ) > > { > > - throw new IOException( "NPANDAY-062-000: Could not read > plugins-compiler.xml", e ); > > + throw new IOException( "NPANDAY-062-000: Could not read > plugins-compiler.xml" ); > > } > > List<ConfigurationAppender> appenders = > model.getConfigurationAppenders(); > > appenderClasses = new HashSet<Class>(); > > @@ -63,7 +63,7 @@ public class ConfigurationAppendersRepos > > } > > catch ( ClassNotFoundException e ) > > { > > - throw new IOException("NPANDAY-xxx-000: Could not load > class appender: Name = " + appender.getName(), e); > > + throw new IOException("NPANDAY-xxx-000: Could not load > class appender: Name = " + appender.getName() ); > > } > > } > > > > > > Modified: > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/ConnectionsRepository.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/ConnectionsRepository.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/ConnectionsRepository.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/ConnectionsRepository.java > Sun May 1 03:43:14 2011 > > @@ -75,7 +75,7 @@ public class ConnectionsRepository > > } > > catch ( RepositoryException e ) > > { > > - throw new IOException("NPANDAY-080-005: Failed to > initialized repository. Message = " + e.getMessage(), e); > > + throw new IOException("NPANDAY-080-005: Failed to > initialized repository. Message = " + e.getMessage() ); > > } > > > > Set<String> keys = properties.keySet(); > > @@ -103,12 +103,12 @@ public class ConnectionsRepository > > catch ( Exception e ) > > { > > throw new IOException( > > - "NPANDAY-080-002: Problem instantiating the DAO > Class: Class Name = " + daoClassName, e ); > > + "NPANDAY-080-002: Problem instantiating the DAO > Class: Class Name = " + daoClassName ); > > } > > catch ( Error e ) > > { > > throw new IOException( > > - "NPANDAY-080-003: Problem instantiating the DAO > Class: Class Name = " + daoClassName, e ); > > + "NPANDAY-080-003: Problem instantiating the DAO > Class: Class Name = " + daoClassName ); > > } > > } > > } > > > > Modified: > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/RepositoryRegistryImpl.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/RepositoryRegistryImpl.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/RepositoryRegistryImpl.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/RepositoryRegistryImpl.java > Sun May 1 03:43:14 2011 > > @@ -113,11 +113,11 @@ public class RepositoryRegistryImpl > > } > > catch ( Exception e ) > > { > > - throw new IOException( "NPANDAY-082-003: Unable to > load repository: " + message, e ); > > + throw new IOException( "NPANDAY-082-003: Unable to > load repository: " + message ); > > } > > catch ( Error e ) > > { > > - throw new IOException( "NPANDAY-082-004: Unable to > load repository: " + message, e ); > > + throw new IOException( "NPANDAY-082-004: Unable to > load repository: " + message ); > > } > > } > > > > @@ -137,11 +137,11 @@ public class RepositoryRegistryImpl > > } > > catch ( Exception e ) > > { > > - throw new IOException( "NPANDAY-082-006: Unable to > load registry: " + message, e ); > > + throw new IOException( "NPANDAY-082-006: Unable to > load registry: " + message ); > > } > > catch ( Error e ) > > { > > - throw new IOException( "NPANDAY-082-007: Unable to > load registry: " + message, e ); > > + throw new IOException( "NPANDAY-082-007: Unable to > load registry: " + message ); > > } > > } > > } > > > > Modified: > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/StandardRepositoryLoader.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/StandardRepositoryLoader.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/StandardRepositoryLoader.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/StandardRepositoryLoader.java > Sun May 1 03:43:14 2011 > > @@ -103,15 +103,15 @@ public class StandardRepositoryLoader > > } > > catch ( IOException e ) > > { > > - throw new IOException( "NPANDAY-084-004: " + e.toString() + > " : " + message, e ); > > + throw new IOException( "NPANDAY-084-004: " + e.toString() + > " : " + message ); > > } > > catch ( Exception e ) > > { > > - throw new IOException( "NPANDAY-084-005: " + e.toString() + > " : " + message, e ); > > + throw new IOException( "NPANDAY-084-005: " + e.toString() + > " : " + message ); > > } > > catch ( Error e ) > > { > > - throw new IOException( "NPANDAY-084-006: " + e.toString() + > " : " + message, e ); > > + throw new IOException( "NPANDAY-084-006: " + e.toString() + > " : " + message ); > > } > > return repository; > > } > > > > Modified: > incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/SettingsRepository.java > > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/SettingsRepository.java?rev=1098215&r1=1098214&r2=1098215&view=diff > > > ============================================================================== > > --- > incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/SettingsRepository.java > (original) > > +++ > incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/SettingsRepository.java > Sun May 1 03:43:14 2011 > > @@ -154,15 +154,15 @@ public final class SettingsRepository > > } > > catch ( IOException e ) > > { > > - throw new IOException( "NPANDAY-084-004: " + > e.toString() + " : " + message, e ); > > + throw new IOException( "NPANDAY-084-004: " + > e.toString() + " : " + message ); > > } > > catch ( Exception e ) > > { > > - throw new IOException( "NPANDAY-084-005: " + > e.toString() + " : " + message, e ); > > + throw new IOException( "NPANDAY-084-005: " + > e.toString() + " : " + message ); > > } > > catch ( Error e ) > > { > > - throw new IOException( "NPANDAY-084-006: " + > e.toString() + " : " + message, e ); > > + throw new IOException( "NPANDAY-084-006: " + > e.toString() + " : " + message ); > > } > > } > > > > > > > > -- > Brett Porter > br...@apache.org > http://brettporter.wordpress.com/ > http://au.linkedin.com/in/brettporter > > > > >