code: public static String getLineNumberFromExceptionTraceLine(String exceptionTraceLine,
                                                               String substrToSearch) {
          String lineNumber = "";
          int index = exceptionTraceLine.indexOf(substrToSearch);
          if (index >= 0) {
              int length = substrToSearch.length() + index;
              if (exceptionTraceLine.lastIndexOf(')') > length) {
                  lineNumber = exceptionTraceLine
                      .substring(length, exceptionTraceLine.lastIndexOf(')'));
              }
          }
          return lineNumber;
      }
docs: Get the error line number from the exception stack trace
  
  @param exceptionTraceLine
  @param substrToSearch
  @return error line number