You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2023/09/14 22:35:27 UTC

[royale-compiler] 01/05: ASTokenFormatter: better error message when block stack isn't empty

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

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

commit 3b5e99fd71f861df517effeb510588e766eb0248
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Sep 13 15:01:41 2023 -0700

    ASTokenFormatter: better error message when block stack isn't empty
---
 .../src/main/java/org/apache/royale/formatter/ASTokenFormatter.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/formatter/src/main/java/org/apache/royale/formatter/ASTokenFormatter.java b/formatter/src/main/java/org/apache/royale/formatter/ASTokenFormatter.java
index 3cddb3214..a8f5e25b8 100644
--- a/formatter/src/main/java/org/apache/royale/formatter/ASTokenFormatter.java
+++ b/formatter/src/main/java/org/apache/royale/formatter/ASTokenFormatter.java
@@ -959,7 +959,7 @@ public class ASTokenFormatter extends BaseTokenFormatter {
 			}
 		}
 		if (blockStack.size() > 0) {
-			throw new Exception("Block stack size too large");
+			throw new Exception("Unexpected end of file. Blocks still considered open by formatter. This is a bug.");
 		}
 		return builder.toString();
 	}