Hi, On Tue, Dec 3, 2013 at 3:08 AM, Michael Dürig <[email protected]> wrote: > Could we include some form of an explanation why a RuntimeException is > thrown here. E.g. throw a tailored descendant of RuntimeException including > some extra message?
Good point, I kind of thought about that but then dropped the ball. The replaced code used to log an "Unexpected error: failed to read privileges." error message in that case, and would follow up to fail the commit because matching privileges were not found. That kind of confuses the purpose of the commit failure (was it caused by an unexpected repository error or a validation issue) so I figured it would be better to throw a separate exception in that case. Given our practice of using checked exceptions for recoverable issues (adjust the content being committed, etc.) and unchecked ones for unexpected issues (network problems, etc.) I went for RuntimeException but left it at that. Fixed in revision 1547319. BR, Jukka Zitting
