Changeset 4237 for trunk/indexers/mgpp


Ignore:
Timestamp:
2003-05-08T09:32:13+12:00 (21 years ago)
Author:
kjdon
Message:

changed the cerr error messages a bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/indexers/mgpp/jni/MGPPWrapperImpl.cpp

    r4212 r4237  
    7878  FID_mgpp_data = j_env->GetFieldID(j_cls, "mgpp_data_ptr_", "J"); //a long-"J"
    7979  if (FID_mgpp_data==NULL) {
    80       cerr <<"field mgpp_data_ptr_ not found"<<endl;
     80      cerr <<"MGPP JNI: field mgpp_data_ptr_ not found"<<endl;
    8181  }
    8282
    8383  FID_query_result = j_env->GetFieldID(j_cls, "mgpp_query_result_", "Lorg/greenstone/mgpp/MGPPQueryResult;"); // an object -"L<class name>;"
    8484  if (FID_query_result==NULL) {
    85       cerr <<"field mgpp_query_result_ not found"<<endl;
     85      cerr <<"MGPP JNI: field mgpp_query_result_ not found"<<endl;
    8686  }
    8787  // the methods we want to use
     
    9191  MID_addDoc = j_env->GetMethodID(JC_MGPPQueryResult, "addDoc", "(JF)V");
    9292  if (MID_addDoc==NULL) {
    93       cerr <<"method not found"<<endl;
     93      cerr <<"MGPP JNI: addDoc method not found"<<endl;
    9494  }
    9595  // addTerm(String term, String tag, int stem_method, long match_docs,
     
    9797  MID_addTerm = j_env->GetMethodID(JC_MGPPQueryResult, "addTerm", "(Ljava/lang/String;Ljava/lang/String;IJJ[Ljava/lang/String;)V");
    9898  if (MID_addTerm==NULL) {
    99       cerr <<"method addTerm not found"<<endl;
     99      cerr <<"MGPP JNI: method addTerm not found"<<endl;
    100100  }
    101101 
     
    103103  MID_setTotalDocs = j_env->GetMethodID(JC_MGPPQueryResult, "setTotalDocs", "(J)V");
    104104  if (MID_setTotalDocs==NULL) {
    105       cerr <<"method setTotalDocs not found"<<endl;
     105      cerr <<"MGPP JNI: method setTotalDocs not found"<<endl;
    106106  }
    107107 
    108108  MID_clearResult = j_env->GetMethodID(JC_MGPPQueryResult, "clear", "()V");
    109109  if (MID_clearResult==NULL) {
    110       cerr <<"method clear not found"<<endl;
     110      cerr <<"MGPP JNI: method clear not found"<<endl;
    111111  }
    112112  MID_setSyntaxError = j_env->GetMethodID(JC_MGPPQueryResult, "setSyntaxError", "(Z)V");
    113113  if (MID_clearResult==NULL) {
    114       cerr <<"method setSyntaxError not found"<<endl;
     114      cerr <<"MGPP JNI: method setSyntaxError not found"<<endl;
    115115  }
    116116
     
    119119  jclass local_CID_String = j_env->FindClass("java/lang/String");
    120120  if (local_CID_String==NULL) {
    121     cerr <<"java String class not found"<<endl;
     121    cerr <<"MGPP JNI: java String class not found"<<endl;
    122122  } else {
    123123    /* create a global ref */
     
    164164#endif
    165165
    166   cerr << "Doing getDocument..." << endl;
    167 
    168166  const char * text_name = j_env->GetStringUTFChars(j_text_name, NULL);
    169167  if (text_name==NULL) {
     
    182180
    183181  // cast to char* otherwise complains about const
    184   cerr << "(MGPP JNI) Base dir: " << base_dir << " Text name: " << text_name << endl;
    185182  td.LoadData((char *)base_dir, (char *)text_name);
    186   cerr << "Done loadData." << endl;
    187183
    188184  UCArray mg_level;
     
    192188  // get the actual text
    193189  if (!GetDocText(td, mg_level, docnum, docText)) {
    194     cerr <<"couldn't retrieve doc text"<<endl;
     190    cerr <<"MGPP JNI: couldn't retrieve doc text"<<endl;
    195191  }
    196192
Note: See TracChangeset for help on using the changeset viewer.