Wrap entire worker script in try catch