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 } 

fiddle: http://jsfiddle.net/trex005/s2u67jrg/


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -