public void flag(ICodeNode node, RuntimeErrorCode errorCode, Backend backend)
        {
            string lineNumber = null;

            while ((node != null) && (node.GetAttribute(ICodeKeyImplementation.LINE) == null))
                node = node.GetParent();

            backend.sendMessage(new Message(MessageType.RUNTIME_ERROR, new Object[] { errorCode.ToString(), (int)node.GetAttribute(ICodeKeyImplementation.LINE) }));

            if (++errorCount > MAX_ERRORS)
            {
                Console.WriteLine("*** ABORTED AFTER TOO MANY RUNTIME ERRORS.");
                Environment.Exit(-1);
            }
        }
Exemple #2
0
        public void flag(ICodeNode node, RuntimeErrorCode errorCode, Backend backend)
        {
            string lineNumber = null;

            while ((node != null) && (node.GetAttribute(ICodeKeyImplementation.LINE) == null))
            {
                node = node.GetParent();
            }

            backend.sendMessage(new Message(MessageType.RUNTIME_ERROR, new Object[] { errorCode.ToString(), (int)node.GetAttribute(ICodeKeyImplementation.LINE) }));

            if (++errorCount > MAX_ERRORS)
            {
                Console.WriteLine("*** ABORTED AFTER TOO MANY RUNTIME ERRORS.");
                Environment.Exit(-1);
            }
        }