예제 #1
0
        public IronyInitializeGrammarException(GrammarErrorList myErrors, String myInfo)
        {
            Info = myInfo;

            Errors = myErrors;

            StringBuilder msg = new StringBuilder();

            msg.AppendLine("An error occurred during initializing the grammar: ");

            foreach (var error in myErrors)
            {
                msg.AppendLine(String.Format("{0} {1} {2}", error.Level.ToString(), error.Message, error.State.Name));
            }

            msg.AppendLine(Info);

            _msg = msg.ToString();
        }
        /// <summary>
        /// Initializes a new instance of the IronyInitializeGrammarException class.
        /// </summary>
        /// <param name="myErrors"></param>
        /// <param name="myInfo"></param>
        /// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
        public IronyInitializeGrammarException(GrammarErrorList myErrors, String myInfo, Exception innerException = null) : base(innerException)
        {
            Info = myInfo;

            Errors = myErrors;

            StringBuilder msg = new StringBuilder();

            msg.AppendLine("An error occurred during initializing the grammar: ");

            foreach (var error in myErrors)
            {
                msg.AppendLine(String.Format("{0} {1} {2}",
                                             error.Level.ToString(),
                                             error.Message,
                                             error.State == null ? "" : error.State.Name));
            }

            msg.AppendLine(Info);

            _msg = msg.ToString();
        }
예제 #3
0
 public Error_IronyCompiler(GrammarErrorList myGrammarErrorList)
 {
     GrammarErrorList = myGrammarErrorList;
 }