code: public String getMessage() {
          StringBuffer sb = new StringBuffer();
          sb.append(desc);
          if (index >= 0) {
              sb.append(" near index ");
              sb.append(index);
          }
          sb.append(nl);
          sb.append(pattern);
          if (index >= 0) {
              sb.append(nl);
              for (int i = 0; i < index; i++) sb.append(' ');
              sb.append('^');
          }
          return sb.toString();
      }
docs: Returns a multi-line string containing the description of the syntax
  error and its index, the erroneous regular-expression pattern, and a
  visual indication of the error index within the pattern.
  
  @return  The full detail message