Use channels to receive errors and window events instead of trait objects