Jody Garnett ha scritto: > Andrea Aime wrote: >> Jody Garnett ha scritto: >>> This is that trade off again about trying to keep going in the event >>> of failure, our writing guidelines encourage code like the example >>> you provided as a way of letting software keep going rather then fail. >>> >>> So taking this to the letter would be "Log and return >>> Filter.EXCLUDES" from the encoder, if the problem failed in an "OR" >>> expression perhaps we can still pull something of value out of the >>> situation. >>> >>> Cheers, >>> Jody >>> PS. For things it cannot encode SqlEncoder is supposed to let post >>> processing handle it, would love to know what the reason for this >>> problem is (and how we can avoid arriving there). >> >> SqlBuilder is supposed to split a filter into an encoable prefilter >> and an un-encoable post filter, and then you encode only what's >> encodable. So, I think the right behaviour is really to throw an >> exception instead of hiding split or filter construction bugs. >> Leniency has a price, it allows you provide some kind of graceful >> degradation, but also hides bugs and sets the scene for unexpected >> behaviour. > Cool I buy that for a dollar, can you mention in the error message that > the bug is actually in SqlBuilder.
Hmm... I can, but it's not always the correct message. In my case, I just built an invalid filter, so it wasn't really SqlBuilder fault. Unfortunately we don't have a way to say "done building filters, are they valid or not?" Cheers Andrea ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
