code: protected String getErrorDesc(int errorType, int currEvent)
      {
          // Defaults are mostly fine, except we can easily add event type desc
          switch (errorType) {
          case ERR_GETELEMTEXT_NOT_START_ELEM:
              return ErrorConsts.ERR_STATE_NOT_STELEM+", got "+ErrorConsts.tokenTypeDesc(currEvent);
          case ERR_GETELEMTEXT_NON_TEXT_EVENT:
              return "Expected a text token, got "+ErrorConsts.tokenTypeDesc(currEvent);
          case ERR_NEXTTAG_NON_WS_TEXT:
              return "Only all-whitespace CHARACTERS/CDATA (or SPACE) allowed for nextTag(), got "+ErrorConsts.tokenTypeDesc(currEvent);
          case ERR_NEXTTAG_WRONG_TYPE:
              return "Got "+ErrorConsts.tokenTypeDesc(currEvent)+", instead of START_ELEMENT, END_ELEMENT or SPACE";
          }
          return null;
      }
docs: Method called upon encountering a problem that should result
  in an exception being thrown. If non-null String is returned.
  that will be used as the message of exception thrown; if null,
  a standard message will be used instead.
  
  @param errorType Type of the problem, one of <code>ERR_</code>
  constants
  @param eventType Type of the event that triggered the problem,
  if any; -1 if not available.