public String getError(int index) {
    if (index < errors.size()) {
      ErrorDetails errorDetails = errors.get(index);
      return errorDetails.lineNumber + ". " + errorDetails.error;
    }
    return null;
  }
public String getError(int index) {
    if (index < errors.size()) {
      ErrorDetails errorDetails = errors.get(index);
      return errorDetails.lineNumber + ". " + errorDetails.error;
    }
    return null;
  }
public String getError ( int index ) { if ( index < errors . size ( ) ) { ErrorDetails errorDetails = errors . get ( index ) ; return errorDetails . lineNumber + ". " + errorDetails . error ; } return null ; }
Returns the error message otherwise returns null;

@return error message
Returns the error message otherwise returns null ;