code: public void registerTagError(String message, String tagName, JspTag tag, Throwable e)
              throws JspException
      {
          assert (message != null) : "parameter 'message' must not be null.";
  
          // add the error to the list of errors
          if (_errors == null)
              _errors = new ArrayList();
  
          TagErrorInfo tei = new TagErrorInfo();
  
          tei.tagType = tagName;
          tei.message = message;
          _errors.add(tei);
  
          IErrorReporter er = getErrorReporter(tag);
          if (er == null) {
              tei.errorNo = -1;
              if (!reportErrorInPage) {
                  String s = Bundle.getString("Tags_NoInPageErrorReporting", new Object[]{message});
                  if (e == null)
                      logger.error(s);
                  else
                      logger.error(s, e);
                  //localRelease();
                  throw new JspException(message);
              }
              return;
          }
  
          // add the error to the ErrorReporter tag
          er.addError(tei);
          assert (tei.errorNo > 0);
          if (!reportErrorInPage) {
              String s = Bundle.getString("Tags_NoInPageErrorReporting", new Object[]{message});
              if (e == null)
                  logger.error(s);
              else
                  logger.error(s, e);
              //localRelease();
              throw new JspException(s);
          }
          return;
      }
docs: This will report an error from a tag.  The error will
  contain a message.  If error reporting is turned off,
  the message will be returned and the caller should throw
  a JspException to report the error.
  @param message - the message to register with the error
  @throws javax.servlet.jsp.JspException - if in-page error reporting is turned off this method will always
  throw a JspException.