diff options
author | Shevek <[email protected]> | 2008-05-08 20:12:25 +0000 |
---|---|---|
committer | Shevek <[email protected]> | 2008-05-08 20:12:25 +0000 |
commit | 88da3880523abbac11b600f09f844752da266f90 (patch) | |
tree | fb796d5470686eb5e13a4dcfda9a56e717de4b62 | |
parent | 932a35e8b2734dfc14aac56c8b1dc96174a5b009 (diff) |
clean up cpp task some more
-rw-r--r-- | src/java/org/anarres/cpp/CppTask.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/java/org/anarres/cpp/CppTask.java b/src/java/org/anarres/cpp/CppTask.java index b3d2e4c..51f32ec 100644 --- a/src/java/org/anarres/cpp/CppTask.java +++ b/src/java/org/anarres/cpp/CppTask.java @@ -1,4 +1,4 @@ -package de.tu_darmstadt.informatik.rbg.mhartle.cpp; +package org.anarres.cpp; import java.io.File; import java.io.FileWriter; @@ -34,8 +34,8 @@ public class CppTask extends Task { } } - private File input = null; - private File output = null; + private File input; + private File output; private Preprocessor cpp; public CppTask() { @@ -63,6 +63,11 @@ public class CppTask extends Task { public void execute() { FileWriter writer = null; try { + if (input == null) + throw new BuildException("Input not specified"); + if (output == null) + throw new BuildException("Output not specified"); + cpp.addInput(this.input); writer = new FileWriter(this.output); for (;;) { Token tok = cpp.token(); |