Пример #1
0
 public ParseException Error(string message)
 {
     message = StackTraceTools.BreadcrumbTrail(this.GetType()) + " : " + message;
     try
     {
         if (!EOF)
         {
             throw new ParseException(this.LA1, message);
         }
         else
         {
             throw new ParseException(message);
         }
     }
     catch (ParseException ex)
     {
         ex.ImpersonateErrorInExternalFile(this.ScriptFilePath, 1);
         throw;
     }
     throw new InvalidOperationException("Whoops! We should never have got here, but we need the line so the compiler doesn't warn about a missing return.");
 }
Пример #2
0
 public ParseException Error(Token LA1, string message)
 {
     message = string.Format("Line {0} Char {1}: {2} : {3}", LA1.Line, LA1.Character, StackTraceTools.BreadcrumbTrail(this.GetType()), message);
     try
     {
         throw new ParseException(LA1, message);
     }
     catch (ParseException ex)
     {
         ex.ImpersonateErrorInExternalFile(this.ScriptFilePath, 1);
         throw;
     }
     throw new InvalidOperationException("Whoops! We should never have got here, but we need the line so the compiler doesn't warn about a missing return.");
 }