You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/10/22 05:44:00 UTC

[royale-compiler] 02/02: try to report an error instead of just crashing

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 66712cd32aad488f77e62f821c830bc5e2fafd1f
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Oct 21 22:43:35 2018 -0700

    try to report an error instead of just crashing
---
 .../org/apache/royale/compiler/internal/graph/GoogDepsWriter.java    | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
index fabfd4a..a6104a0 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
@@ -391,6 +391,11 @@ public class GoogDepsWriter {
 			if (!isGoogClass(className))
 			{
 				GoogDep gd = depMap.get(className);
+				if (gd == null)
+				{
+					System.out.println("No GoogDep for " + className);
+					throw new RuntimeException("Unable to find dependency information for class: " + className);
+				}
 				if (!visited.containsKey(className))
 				{
 					sortFunction(gd, arr);