Changeset 320

Show
Ignore:
Timestamp:
02/29/08 02:19:22 (9 months ago)
Author:
jake
Message:

removed asserts

Location:
trunk/thrudex/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/thrudex/src/CLuceneBackend.cpp

    r299 r320  
    103103 
    104104        wstring doc_key     = build_wstring( d.key ); 
    105         assert( !doc_key.empty() ); 
     105 
     106        if( doc_key.empty() ){ 
     107            ThrudexException ex; 
     108            ex.what = "Missing key"; 
     109 
     110            throw ex; 
     111        } 
    106112 
    107113 
  • trunk/thrudex/src/CLuceneIndex.cpp

    r294 r320  
    272272    LOG4CXX_DEBUG(logger,"Searching in: ("+q.index+")"); 
    273273 
     274 
     275    if( q.query.empty() ){ 
     276        ThrudexException ex; 
     277        ex.what = "Query is empty"; 
     278        throw ex; 
     279    } 
     280 
    274281    shared_ptr<CLuceneRAMDirectory> l_ram_prev_directory = ram_prev_directory; 
    275282 
     
    280287 
    281288    try{ 
    282  
    283         assert( !q.query.empty() ); 
    284289 
    285290        LOG4CXX_DEBUG(logger,q.query); 
     
    355360 
    356361                if(id == NULL){ 
    357                     assert(id != NULL); 
     362                    //assert(id != NULL); 
    358363                    continue; 
    359364                } else { 
     
    383388 
    384389                if(id == NULL) { 
    385                     assert(id != NULL); 
     390                    //assert(id != NULL); 
    386391                    continue; 
    387392                } else {