Example #1
0
 public static string ErrorName(ScriptParserError error)
 {
     switch (error) {
     case ScriptParserError.PARSER:
         return "ERROR_PARSER";
     case ScriptParserError.HIERARCHY:
         return "ERROR_HIERARCHY";
     case ScriptParserError.MEMALLOC:
         return "ERROR_MEMALLOC";
     default:
         return "ERROR_UNKNOWN";
     }
 }
Example #2
0
 /**
 Constructor with values.
 */
 public ScriptParserException(ScriptParserError error, string reporter, Token<ScriptToken> token, ScriptParser parser, string message)
 {
     _error=error;
     _reporter=reporter;
     _token=token;
     _parser=parser;
     _message=message;
     if (_parser!=null && _token==null)
     _token=_parser.Token;
 }