class DefaultErrorListener implements ErrorListener {

    @Override
    public void onSubpackageException(final Exception error, final PackageId packageId) {
        final String message = MessageFormat.format(getString("Package error: {0} \"{1}\""),
                error.getClass().getName(), error.getMessage());
        LOGGER.trace("[onSubpackageException] stack trace for: " + message, error);
        reportViolation(new SimpleViolation(Severity.MAJOR, message, packageId));
    }

}