mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
catch and print watcher user provided routine exception
This commit is contained in:
parent
46dba2f355
commit
88fd6357db
1 changed files with 8 additions and 1 deletions
|
|
@ -23,6 +23,8 @@ import java.util.Map;
|
|||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import org.apache.zeppelin.scheduler.ExecutorFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -105,6 +107,7 @@ public class AngularObject<T> {
|
|||
emit();
|
||||
}
|
||||
|
||||
final Logger logger = LoggerFactory.getLogger(AngularObject.class);
|
||||
List<AngularObjectWatcher> ws = new LinkedList<AngularObjectWatcher>();
|
||||
synchronized (watchers) {
|
||||
ws.addAll(watchers);
|
||||
|
|
@ -115,7 +118,11 @@ public class AngularObject<T> {
|
|||
executor.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
w.watch(before, after);
|
||||
try {
|
||||
w.watch(before, after);
|
||||
} catch (Exception e) {
|
||||
logger.error("Exception on watch", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue