On Aug 23, 2006, at 7:24 PM, Mag Gam wrote:
I am trying to do a Query parse line in a doGET method (J2EE).
I keep getting this type of message;
unreported exception org.apache.lucene.queryParser.ParseException;
must be
caught or declared to be thrown
Anyone have an example of a Class being thrown an exception?
I would kindly appreciate it.
The simplest thing would be something like this in a servlet:
try {
Query query = parser.parse(...);
}
catch (ParseException pe) {
throw new IOException(pe.getMessage());
}
But you may not want the user to see that harsh of an error from your
servlet when an unparsable expression is used. Typically that
exception is caught and a friendlier message is provided to the user.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]