2
我在网络应用程序中使用Prototype,并且当抛出异常(包括处理的异常)时我想中断。但是,我不想打破用于流量控制的异常,特别是Prototype的each
实现中使用的throw $break
模式。
function detect(iterator, context) {
var result;
this.each(function(value, index) {
if (iterator.call(context, value, index)) {
result = value;
throw $break; // I want to ignore this one
}
});
return result;
}
有谁知道如何让Chrome的调试器忽略特定的异常?或者让它忽略特定行引发的异常?甚至是为了让它在特定文件中不被破解?