]> source.dussan.org Git - aspectj.git/commitdiff
diagnostics
authoraclement <aclement>
Thu, 4 Jun 2009 18:25:51 +0000 (18:25 +0000)
committeraclement <aclement>
Thu, 4 Jun 2009 18:25:51 +0000 (18:25 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java

index 99832ba94ca5fb2e0fbb11443968d48c24fc160e..202ff91bcf018b542183443a64c955aeabde621b 100644 (file)
@@ -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);