Try Catch for error message in google maps api : <p>I an using javascript and am getting an message that I have exceeded my daily request quota for this API.  Is there a way to capture this error message in a try catch block so when I go over my quota I can execute another piece of code.  I have seen several similar posts, but nothing that has been helpful.  Here is my code.</p>

<pre><code>(function (window, google, lat, lng) {
           var options = {
               center: {
                   lat: Number(lat),
                   lng: Number(lng)
               },
                 zoom: 5,
                 disableDefaultUI: true,
                 scrollwheel: true,
                 draggable: false
           },
           element = document.getElementById('map-canvas')
           var map = new google.maps.Map(element, options)
       }(window, window.google, result[i]['latitude'], result[i]['longitude']));
</code></pre>
