diff options
-rw-r--r-- | Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java | 24 | ||||
-rw-r--r-- | Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java | 12 |
2 files changed, 26 insertions, 10 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java index ae1ac7e..8482401 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java @@ -120,32 +120,44 @@ public class FrameworkBuildTask extends Task{ //
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (PcdAutogenException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (AutoGenException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (PlatformPcdPreprocessBuildException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (GenBuildException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (EdkException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
}
}
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java index 7e87e28..a131b89 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java @@ -158,7 +158,11 @@ public class AutogenLibOrder { // First, add the library instance without consumers to the Q
//
for (int i = 0; i < libInstanceList.length; ++i) {
- if (libInstanceConsumedBy.get(libInstanceList[i]).size() == 0) {
+ if (libInstanceList[i] == null) {
+ continue;
+ }
+
+ if (libInstanceConsumedBy.get(libInstanceList[i]) == null || libInstanceConsumedBy.get(libInstanceList[i]).size() == 0) {
noConsumerList.add(libInstanceList[i]);
}
}
@@ -174,7 +178,7 @@ public class AutogenLibOrder { continue;
}
HashSet<ModuleIdentification> consumedBy = libInstanceConsumedBy.get(m);
- if (consumedBy.size() == 0) {
+ if (consumedBy == null || consumedBy.size() == 0) {
continue;
}
@@ -194,7 +198,7 @@ public class AutogenLibOrder { }
HashSet<ModuleIdentification> consumedBy = libInstanceConsumedBy.get(libInstance);
- if (consumedBy.size() == 0) {
+ if (consumedBy == null || consumedBy.size() == 0) {
continue;
}
@@ -234,7 +238,7 @@ public class AutogenLibOrder { boolean HasError = false;
for (int i = 0; i < libInstanceList.length; ++i) {
HashSet<ModuleIdentification> consumedBy = libInstanceConsumedBy.get(libInstanceList[i]);
- if (consumedBy.size() > 0 && libInstanceList[i].hasConstructor()) {
+ if (consumedBy != null && consumedBy.size() > 0 && libInstanceList[i].hasConstructor()) {
EdkLog.log(EdkLog.EDK_ERROR, libInstanceList[i].getName()
+ " with constructor has a circular dependency!");
ModuleIdentification[] consumedByList = consumedBy.toArray(new ModuleIdentification[consumedBy.size()]);
|