From d427dae27d4c5ac7c2f4ffe837833316094c0bd6 Mon Sep 17 00:00:00 2001 From: James Harkins Date: Tue, 19 Jun 2012 10:27:19 +0800 Subject: [PATCH] More meaningful error message for too many selectors --- lang/LangSource/PyrParseNode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/LangSource/PyrParseNode.cpp b/lang/LangSource/PyrParseNode.cpp index 958160b4e..1a7366656 100644 --- a/lang/LangSource/PyrParseNode.cpp +++ b/lang/LangSource/PyrParseNode.cpp @@ -4216,7 +4216,7 @@ int conjureSelectorIndex(PyrParseNode *node, PyrBlock* func, // otherwise add it to the selectors table if (selectors->size+1 >= 256) { - error("Literal table too big. Simplify the function.\n"); + error("Selector table too big: too many classes, method selectors or function definitions in this function. Simplify the function.\n"); post("Next selector was: %s\n", selector->name); nodePostErrorLine(node); compileErrors++; @@ -4267,7 +4267,7 @@ int conjureLiteralSlotIndex(PyrParseNode *node, PyrBlock* func, PyrSlot *slot) // otherwise add it to the selectors table if (selectors->size+1 >= 256) { - error("Literal table too big (>256). Simplify the function.\n"); + error("Selector table too big: too many classes, method selectors or function definitions in this function. Simplify the function.\n"); post("Next literal was:\n"); dumpPyrSlot(slot); nodePostErrorLine(node); -- 2.11.4.GIT