aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2009-06-04 18:25:51 +0000
committeraclement <aclement>2009-06-04 18:25:51 +0000
commit433cf59cfb44d1b0bb1e3059e1940cfe720167c5 (patch)
treeda6e10ecdbbed56729d4eaca26b40b56b53b45fb
parent3417cbe70eb77243767e59f9fd181b989c8cefb6 (diff)
downloadaspectj-433cf59cfb44d1b0bb1e3059e1940cfe720167c5.tar.gz
aspectj-433cf59cfb44d1b0bb1e3059e1940cfe720167c5.zip
diagnostics
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java14
1 files changed, 11 insertions, 3 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 99832ba94..202ff91bc 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
@@ -1106,9 +1106,17 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
} else {
outFile = new File(destinationPath, filename).getPath();
}
- BufferedOutputStream os = FileUtil.makeOutputStream(new File(outFile));
- os.write(classFile.getBytes());
- os.close();
+
+ try {
+ BufferedOutputStream os = FileUtil.makeOutputStream(new File(outFile));
+ os.write(classFile.getBytes());
+ os.close();
+ } catch (FileNotFoundException fnfe) {
+ IMessage msg = new Message("unable to write out class file: '" + filename + "' - reason: " + fnfe.getMessage(),
+ IMessage.ERROR, null, new SourceLocation(new File(outFile), 0));
+ handler.handleMessage(msg);
+ }
+
if (buildConfig.getCompilationResultDestinationManager() != null) {
buildConfig.getCompilationResultDestinationManager().reportFileWrite(outFile,
CompilationResultDestinationManager.FILETYPE_CLASS);