class DefaultErrorListener implements ErrorListener {

    @Override
    public void onNodeTypeRegistrationError(final Throwable error, final URL resource) {
        if (error.getCause() != null) {
            onNodeTypeRegistrationError(error.getCause(), resource);
        } else {
            final String message = MessageFormat.format(getString("NodeType registration error ({0}): {1} \"{2}\""),
                    String.valueOf(resource), error.getClass().getName(), error.getMessage());
            LOGGER.trace("[onNodeTypeRegistrationError] stack trace for: " + message, error);
            reportViolation(new SimpleViolation(Severity.MAJOR, message));
        }
    }

}