For asynchronous Traits observers as introduced by PR #1770, exceptions occurring in the observer are swallowed entirely, with no easy way to log the exception.
It would be useful to have the option to act on the exception in some way (for example, by logging). This would probably entail adding a Traits-specific wrapper around the coroutine to be executed.
For normal (synchronous) Traits observers, if an exception occurs then we execute Traits's exception handler, which by default simply logs the exception. The relevant code (or at least part of it) is here: https://github.com/enthought/traits/blob/53654f9bf8bfe353a63ab3a71fdd0869609e9502/traits/observation/_trait_event_notifier.py#L121-L124
For asynchronous Traits observers as introduced by PR #1770, exceptions occurring in the observer are swallowed entirely, with no easy way to log the exception.
It would be useful to have the option to act on the exception in some way (for example, by logging). This would probably entail adding a Traits-specific wrapper around the coroutine to be executed.