Author: dgolovin
Date: 2009-06-29 10:45:59 -0400 (Mon, 29 Jun 2009)
New Revision: 16250
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateResourcesStep.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateSupport.java
Log:
catch (Exception e) blocks were replaced for particular exceptions
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateResourcesStep.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateResourcesStep.java 2009-06-29
14:41:50 UTC (rev 16249)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateResourcesStep.java 2009-06-29
14:45:59 UTC (rev 16250)
@@ -12,11 +12,13 @@
import java.io.File;
import java.io.FileFilter;
+import java.io.IOException;
import java.util.*;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.common.meta.action.impl.MultistepWizardStep;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.project.IModelNature;
@@ -54,7 +56,7 @@
if(r != null) excludedResources.add(r.getFullPath().toString());
r = root.findMember("WebContent/WEB-INF/classes");
if(r != null) excludedResources.add(r.getFullPath().toString());
- } catch (Exception e) {
+ } catch (CoreException e) {
WebModelPlugin.getPluginLog().logError(e);
}
}
@@ -102,7 +104,7 @@
File f = r.getLocation().toFile();
try {
set.add(f.getCanonicalPath());
- } catch (Exception e) {
+ } catch (IOException e) {
WebModelPlugin.getPluginLog().logError(e);
}
}
@@ -117,7 +119,7 @@
String path = null;
try {
path = pathname.getCanonicalPath();
- } catch (Exception e) {
+ } catch (IOException e) {
WebModelPlugin.getPluginLog().logError(e);
}
return path != null && !set.contains(path);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateSupport.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateSupport.java 2009-06-29
14:41:50 UTC (rev 16249)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateSupport.java 2009-06-29
14:45:59 UTC (rev 16250)
@@ -86,7 +86,7 @@
setVersionList();
try {
prepareStep(RESOURCES_STEP);
- } catch (Exception e) {
+ } catch (XModelException e) {
WebModelPlugin.getPluginLog().logError(e);
}
}
Show replies by date