Class DefaultObserverErrorHandler

java.lang.Object
net.carcdr.ycrdt.DefaultObserverErrorHandler
All Implemented Interfaces:
ObserverErrorHandler

public final class DefaultObserverErrorHandler extends Object implements ObserverErrorHandler
Default implementation of ObserverErrorHandler that prints errors to stderr.

This handler provides backwards-compatible behavior by printing exception messages and stack traces to the standard error stream.

For production applications, consider implementing a custom handler that integrates with your logging framework:


 doc.setObserverErrorHandler((exception, source) -> {
     logger.error("Observer error in {}: {}", source, exception.getMessage(), exception);
 });
 
See Also: