try { var obj = JSON.parse(json string); } catch (e) { throw new Error('something bad happened'); console.log(e); //如何让程序停在这,不执行后面的代码 }