fabianmoronzirfas
5/10/2012 - 5:34 PM

catch an error

catch an error

try{
var no_no = nothing; // nothing does not exist
// so this produces an error
}catch(e){
// open a window and show the alert.
// \n is just a breakline
// \" is to show quotation marks in text
alert("This is the error message \"e\":\n" + e);
}