looks reasonable to me... that would also allow to write better
commit hook tests that don't mix up the different type of failures
and just pass by coincidence.

angela

On 4/5/13 1:27 PM, Jukka Zitting wrote:
Hi,

I'd like to introduce error codes for the CommitFailedExceptions
thrown by various commit hooks and other components.

Like the immediately recognizable (and nicely googleable) "ORA-NNNNN"
codes used by the Oracle database, each individual Oak error condition
should have it's own code in addition to a textual message that
describes the issue. Something like "OakTypeNNNN" where "Type"
indicates the error category (like "Constraint" for constraint and
"Access" for access violations) and "NNNN" is a numeric code for that
specific problem.

Such error coding should allow us to avoid the somewhat awkward
CommitFailedException.throwRepositoryException() mechanism. And
documentation about common error scenarios could easily evolve in the
wiki with such error codes as page names.

BR,

Jukka Zitting

Reply via email to