Answers for "global catch in javascript"

0

global catch in javascript

<script>
  window.onerror = function(message, url, line, col, error) {
    alert(`${message}\n At ${line}:${col} of ${url}`);
  };

  function readData() {
    badFunc(); // Whoops, something went wrong!
  }

  readData();
</script>
Posted by: Guest on December-01-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language