catch dart2js errors on startup