I have been investigating the behavior of guava Services when Exceptions are thrown at different points in their lifecycle.
If an exception is thrown while starting a guava Service (AbstractIdleService and AbstractScheduledService, haven't looked at others) the exception is thrown back to startAndWait() or start().get() correctly but the thread the service was starting up on also dies with an exception. In my use case, the startAndWait() exception is caught and dealt with but the other exception gets caught by an UncaughtExceptionHandler.
However, if an exception is thrown after startup by a Service that uses a separate Thread for execution, the thread dies without throwing an uncaught exception.
Shouldn't the behavior here at least be consistent? Did I miss something here? The current handling of exceptions after startup seems more correct to me.
Thanks,
Peter Kelley