Skip to main content

Posts

Showing posts from March, 2017

Error Handling in Javascript try catch

Error Handling in Javascript <div class="jumbotron">     <button class="btn btn-danger" onclick="myFunc()">Click Me</button> </div> /* var myFunc=function()     {         var a = 100;         var b = 0;         try         {             throw("Divide by zero");             var c = a / b;         }         catch(e)         {             alert(e);         }         finally {             alert("in finally");         }     }*/     window.onerror=function(msg,url,ln)     {         alert(msg);         alert(url);       ...