// Throws an exception, but also returns an exception so that you can use 'throw' syntax
 // at the calling site to prevent the compiler from complaining about control flow branches
 // that aren't actually accessible.
 public static ParserException ThrowException(Localization.Locale locale, Localization.ErrorMessages errorType, Token token, params string[] args)
 {
     throw new ParserException(locale.Strings.Get(errorType.ToString(), args));
 }
Beispiel #2
0
 public ParserException(Localization.ErrorMessages errorType, Token token, Localization.Locale locale)
     : this(token, locale.Strings.Get(errorType.ToString()))
 {
 }
Beispiel #3
0
 public ParserException(Localization.ErrorMessages errorType, Token token, Localization.Locale locale)
     : this(token, locale.Strings.Get(errorType.ToString()))
 {
     this.TokenInfo       = token;
     this.OriginalMessage = locale.Strings.Get(errorType.ToString());
 }