Use Node.js domains to gracefully handle exceptions.