For Jackrabbit 3, I would like to improve exception handling. Some ideas: == Use Error Codes ==
Currently exception message are hardcoded (in English). When using error codes, exception messages could be translated. I'm not saying we should translate them ourselves, but if somebody wants to, he could. Disadvantage: it's more work to maintain, specially if Jackrabbit is split into multiple projects. Every project could have it's own message list, or the list could be centralized. I'm not sure if it's worth it. What do you think? == Include the Jackrabbit Version in Exceptions == This is mainly to simplify support: it's very easy to say what version was used when somebody posts an exception message. Example: "Repository is closed [1000-3.0.1003]" - this would mean error code 1000, Jackrabbit version 3.0, build 1003. The build number alone would be enough, but for the user it may be better to also include the version. Also, it will allow looking at the source code without having to download the source code of the correct version, even without having to install an IDE. I wrote a simple JavaScript application: http://www.h2database.com/html/sourceError.html - if you paste an exception in the 'Input' text area, it will link to the source code and display additional information. The source code is in a IFrame that links to the right tag in the source repository. For example, if you paste the following exception: Syntax error in SQL statement "SELECT * FORM[*] TEST " [42000-130] at org.h2.message.DbException.getJdbcSQLException(DbException.java:317) at org.h2.message.DbException.get(DbException.java:168) at org.h2.message.DbException.get(DbException.java:145) at org.h2.message.DbException.getSyntaxError(DbException.java:180) at org.h2.command.Parser.getSyntaxError(Parser.java:475) You will be able to browse the source code in the "Source Code" frame. If Jackrabbit is split into multiple projects, there would be multiple versions. There are solutions for this, but as a start, it's easier to just use this mechanism in one project only (Jackrabbit Core). Regards, Thomas