An Error-Minimizing Framework for Localizing Jammers in Wireless Networks