Added callback funcitonality to exceptions.js