/** * Invoked when a non-fatal exception occurred while reading metadata. * This method sends a record to the registered listeners if any, * or logs the record otherwise. */ private void warning(final Exception e) { decoder.listeners.warning(null, e); }
/** * Reports a warning represented by the given message and exception. * At least one of {@code message} and {@code exception} shall be non-null. * * @param message the message to log, or {@code null} if none. * @param exception the exception to log, or {@code null} if none. */ final void warning(final String message, final Exception exception) { listeners.warning(message, exception); }
/** * Invoked by the UCAR netCDF library when an error occurred. * * @param message the error message. */ @Override public void setError(final String message) { listeners.warning(message, null); }
/** * Invoked when a non-fatal exception occurred while reading metadata. * This method sends a record to the registered listeners if any, * or logs the record otherwise. */ private void warning(final Exception e) { decoder.listeners.warning(null, e); }
/** * Invoked by the UCAR netCDF library when an error occurred. * * @param message the error message. */ @Override public void setError(final String message) { listeners.warning(message, null); }
/** Reports the occurrence of a non-fatal error during XML unmarshalling. */ @Override public void warningOccured(final Object source, final LogRecord warning) { warning.setLoggerName(Loggers.XML); listeners.warning(warning); } });
/** Reports the occurrence of a non-fatal error during XML unmarshalling. */ @Override public void warningOccured(final Object source, final LogRecord warning) { warning.setLoggerName(Loggers.XML); listeners.warning(warning); } });
/** * Logs a warning as if it originated from the {@link #features(boolean)} method. * This is a callback method for {@link FeatureIterator}. */ final void log(final LogRecord warning) { warning.setSourceClassName(Store.class.getName()); warning.setSourceMethodName("features"); listeners.warning(warning); }
/** * Logs a warning as if it originated from the {@link #features(boolean)} method. * This is a callback method for {@link FeatureIterator}. */ final void log(final LogRecord warning) { warning.setSourceClassName(Store.class.getName()); warning.setSourceMethodName("features"); listeners.warning(warning); }
/** * Reports a warning. */ private void log(final LogRecord record) { record.setSourceClassName(Store.class.getName()); record.setSourceMethodName("getMetadata"); // Public facade for the parse() method. record.setLoggerName(Loggers.WKT); listeners.warning(record); }
/** * Reports a warning, if non-null. */ private void log(final LogRecord record) { if (record != null) { record.setSourceClassName(Store.class.getName()); record.setSourceMethodName("getMetadata"); // Public facade for the parse() method. record.setLoggerName(Loggers.XML); listeners.warning(record); } }
/** * Reports a warning, if non-null. */ private void log(final LogRecord record) { if (record != null) { record.setSourceClassName(Store.class.getName()); record.setSourceMethodName("getMetadata"); // Public facade for the parse() method. record.setLoggerName(Loggers.XML); listeners.warning(record); } }
/** * Reports a warning. * * @param source the source class, either {@code MetadataSource} or {@code MetadataWriter}. * @param method the method to report as the warning emitter. * @param record the warning to report. */ final void warning(final Class<? extends MetadataSource> source, final String method, final LogRecord record) { record.setSourceClassName(source.getCanonicalName()); record.setSourceMethodName(method); record.setLoggerName(Loggers.SQL); listeners.warning(record); }
/** * Sends the given message to the listeners if the message is non-white. */ private void warning(CharSequence message) { message = CharSequences.trimWhitespaces(message); if (message.length() != 0) { listeners.warning(message.toString(), null); } } }
/** * Sends the given message to the listeners if the message is non-white. */ private void warning(CharSequence message) { message = CharSequences.trimWhitespaces(message); if (message.length() != 0) { listeners.warning(message.toString(), null); } } }
/** * Logs a warning about a file that could be read, but happen to be a directory that we have read previously. * We could add the existing {@link Aggregate} instance in the parent {@code Aggregate} that we are building, * but doing so may create a cycle. Current version logs a warning instead because users may not be prepared * to handle cycles. Not that we have no guarantee that a cycle really exists at this stage, only that it may * exist. */ private void sharedRepository(final Path candidate) { if (!sharedRepositoryReported) { sharedRepositoryReported = true; listeners.warning(message(Resources.Keys.SharedDirectory_1, candidate), null); } }
/** * Logs a warning about a file that could be read, but happen to be a directory that we have read previously. * We could add the existing {@link Aggregate} instance in the parent {@code Aggregate} that we are building, * but doing so may create a cycle. Current version logs a warning instead because users may not be prepared * to handle cycles. Not that we have no guarantee that a cycle really exists at this stage, only that it may * exist. */ private void sharedRepository(final Path candidate) { if (!sharedRepositoryReported) { sharedRepositoryReported = true; listeners.warning(message(Resources.Keys.SharedDirectory_1, candidate), null); } }
/** * Logs a warning using the localized error resource bundle for the locale given by * {@link WarningListeners#getLocale()}. * * @param key one of {@link Errors.Keys} values. */ private void warning(final short key, final Object p1, final Object p2, final Exception e) { final WarningListeners<DataStore> listeners = decoder.listeners; listeners.warning(Errors.getResources(listeners.getLocale()).getString(key, p1, p2), e); }
/** * Reports a warning for a WKT that can not be read. This method should be invoked only when the CRS * can not be created at all; it should not be invoked if the CRS has been created with some warnings. */ final void log(final Exception e) { final DataStore store = listeners.getSource(); listeners.warning(Resources.forLocale(store.getLocale()) .getString(Resources.Keys.CanNotReadCRS_WKT_1, store.getDisplayName()), e); }
/** * Reports a warning for a WKT that can not be read. This method should be invoked only when the CRS * can not be created at all; it should not be invoked if the CRS has been created with some warnings. */ final void log(final Exception e) { final DataStore store = listeners.getSource(); listeners.warning(Resources.forLocale(store.getLocale()) .getString(Resources.Keys.CanNotReadCRS_WKT_1, store.getDisplayName()), e); }