示例#1
0
文件: Error.cs 项目: c272/algo-lang
        //A fatal compile message (the compiler has failed).
        public static void FatalCompile(string msg)
        {
            //Send the error message.
            Console.ForegroundColor = ConsoleColor.Red;
            ALEC.Log("FATAL - " + msg, ALECEvent.Fatal);
            Console.ResetColor();

            //Print the compile footer.
            ALEC.PrintCompileFooter();

            //Test mode? Throw instead of exit.
            if (AlgoRuntimeInformation.UnitTestMode)
            {
                throw new Exception(msg);
            }

            Environment.Exit(-1);
        }
示例#2
0
文件: Error.cs 项目: c272/algo-lang
 //A warning compile message.
 public static void WarningCompile(string msg)
 {
     Console.ForegroundColor = ConsoleColor.Yellow;
     ALEC.Log("WARN - " + msg, ALECEvent.Warning);
     Console.ResetColor();
 }