class DefaultErrorListener implements ErrorListener {

    @Override
    public void onImporterException(final Exception error, final PackageId packageId, final String path) {
        // Ignore PathNotFoundException, as it is thrown A LOT
        if (!(error instanceof PathNotFoundException)) {
            final String message = MessageFormat.format(getString("{0} - Importer error: {1} \"{2}\""),
                    path, error.getClass().getName(), error.getMessage());
            LOGGER.trace("[onImporterException] stack trace for: " + message, error);
            reportViolation(new SimpleViolation(Severity.MAJOR, message, packageId));
        }
    }

}