The criteria API specifies the use of IllegalStateException and IllegalArgumentException for reporting errors with unfound subpaths. I don’t like this decision but we have to live with it. (IllegalStateException is especially inappropriate.) To comply with this, but also produce more nicely-typed errors (for use in Query Validator, for example), I’m adding two new subclasses of the mandated exception types: TerminalPathException and PathElementException. |