title: How can we catch an error thrown by included javascript file in the main file?
body: <p>Consider a case where I am working with for example the script main.js.</p>
  
  <p>Now when I include some random.js file in main.js file.</p>
  
  <p>If random.js file generates some error how do I catch and handle it in my main.js file so that it does not reaches the client side.</p>