Surround runnable task with try-catch.