From 433cf59cfb44d1b0bb1e3059e1940cfe720167c5 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 4 Jun 2009 18:25:51 +0000 Subject: [PATCH] diagnostics --- .../ajdt/internal/core/builder/AjBuildManager.java | 14 +++++++++++--- 1 file 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); -- 2.39.5