Eat all exceptions on deployment thread.

An unhandled exception on deployment thread seems to abort the
whole process. To avoid the risk, we catched all the exceptions
on each thread.