Changeset 11021 for trunk/gsdl3


Ignore:
Timestamp:
2005-12-21T13:56:45+13:00 (18 years ago)
Author:
kjdon
Message:

asserts if they fail kill tomcat, so changed some asserts to if statements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/packages/mg/jni/MGWrapperImpl.c

    r9874 r11021  
    374374
    375375  jthrowable exc;
    376 
    377376  /* First of all, clear the previous result */
    378377  /* The result to write to */
     
    390389  /* Make sure an index has been specified */
    391390  index_path = data->queryInfo->index;
    392   assert(index_path != NULL);
     391  if (index_path == NULL) {
     392    return;
     393  }
    393394
    394395  /* Obtain C versions of the two string parameters */
     
    414415    return;
    415416  }
    416   /*assert(qd != NULL);*/
    417 
     417 
    418418  /* Remove anything hanging around from last time */
    419419  FreeQueryDocs(qd);
     
    421421  /* Obtain a C version of the query string */
    422422  query = (char*) (*j_env)->GetStringUTFChars(j_env, j_query, NULL);
    423   assert(query != NULL);
     423  if (query == NULL) {
     424    return;
     425  }
    424426  printf("Searching for query \"%s\"...\n", query);
    425427
     
    471473
    472474  /* Check the query was processed successfully */
    473   assert(qd->DL != NULL);
    474   assert(qd->QTL != NULL);
    475   assert(qd->TL != NULL);
     475  if (qd->DL == NULL || qd->QTL == NULL || qd->TL == NULL) {
     476    return;
     477  }
    476478
    477479  /* Record the total number of matching documents */
Note: See TracChangeset for help on using the changeset viewer.