catch require and sandbox exceptions