class DefaultErrorListener implements ErrorListener {

    @Override
    public void onRepoInitInlineError(final Throwable error, final List<String> repoinits) {
        final String firstLine = repoinits == null || repoinits.isEmpty()
                ? "<empty>"
                : repoinits.get(0).split("\\r?\\n")[0] + "...";
        final String message = MessageFormat.format(getString("repoinit inline error ({0}): {1} \"{2}\""),
                firstLine, error.getClass().getName(), error.getMessage());
        LOGGER.trace("[onRepoInitInlineError] stack trace for: " + message, error);
        reportViolation(new SimpleViolation(Severity.MAJOR, message));
    }

}