lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject RE: Problems...
Date Thu, 06 Jan 2005 23:32:23 GMT

: Hoss, could you tell me what to exceptions I'm missing?  Thanks!

anytime you have a "catch" block, you should be doing something with that
exception.  If possible, you can recover from an exception, but no matter
what you should log the exception in some way so that you know it

Your code has two places where it was catching an exception and doing
absolutely nothing at all -- allowing processing to continue without even
a warning.  there was also an area of your code where if you encountered a
parse exception from the user input, you invented your own query instead
-- again without any sort of logging to let you know waht was happening in
the code.  building your own query when the users query is giberish isn't
neccessarily bad, but logging is your friend.

it wasn't clear from the descirption of your problem what you were trying
to query for so it was very possible that there was a problem parsing your
query, and it was doing the "default" search in that catch block and
giving you back zero results ... hence my question about the
SYstem.out.println calls that *were* in your code.

logging is (again) your friend.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message