aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
index a6fbe2970..cda98088d 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
@@ -18,6 +18,7 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
@@ -505,10 +506,18 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
if (buildConfig.getCompilationResultDestinationManager() != null) {
destDir = buildConfig.getCompilationResultDestinationManager().getOutputLocationForResource(srcLocation.getAbsolutePath());
}
- OutputStream fos =
- FileUtil.makeOutputStream(new File(destDir,filename));
- fos.write(content);
- fos.close();
+ try {
+ OutputStream fos =
+ FileUtil.makeOutputStream(new File(destDir,filename));
+ fos.write(content);
+ fos.close();
+ } catch (FileNotFoundException fnfe) {
+ IMessage msg = new Message("unable to copy resource to output folder: '" + filename + "' - reason: "+fnfe.getMessage(),
+ IMessage.ERROR,
+ null,
+ new SourceLocation(srcLocation,0));
+ handler.handleMessage(msg);
+ }
}
state.recordResource(filename);
}