From: aclement Date: Thu, 4 Jun 2009 18:25:51 +0000 (+0000) Subject: diagnostics X-Git-Tag: V1_6_5~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=433cf59cfb44d1b0bb1e3059e1940cfe720167c5;p=aspectj.git diagnostics --- 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);