javascript: throw new error without displaying to user -
is there way can use throw new error in javascript , hide display or change display of console window? throwing error end program.
put program's execution within try/catch. can handle error want to. however, seems pretty hack-ish way terminate execution.
function run_my_program(){ //do here throw "i want break world!"; } try{ run_my_program(); } catch(err) { //do whatever want err }
Comments
Post a Comment