diff options
author | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-10 05:55:36 +0000 |
---|---|---|
committer | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-10 05:55:36 +0000 |
commit | 63cdbe79b1c883ae1321d2f8564f80e5fb6606ec (patch) | |
tree | 2a8607081319272b031a733ea76a88319dee4f4d /Tools/Java/Source | |
parent | fd6c41f5e24655889c4d2b33f1fb29e318ee3c82 (diff) | |
download | edk2-platforms-63cdbe79b1c883ae1321d2f8564f80e5fb6606ec.tar.xz |
Added code to check if "cmd" attribute is valid or not. This is to make error report more accurate.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1702 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java/Source')
-rw-r--r-- | Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java index d983880ac7..9b66ebe9e3 100644 --- a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java @@ -227,6 +227,13 @@ public class UserDefineDef extends ProcessorDef { if (isReference()) {
throw tooManyAttributes();
}
+ if (cmd == null || cmd.trim().length() == 0) {
+ throw new BuildException("cmd attribute is empty!");
+ }
+ File cmdProgram = new File(cmd);
+ if (cmdProgram.isDirectory()) {
+ throw new BuildException(cmd + " is not valid or executable!");
+ }
this.cmd = cmd;
}
|