'use strict'; (function() { $('img').bind('error', function(event) { imageError(event.target); }); })(); function imageError(target) { Rollbar.error('Image with url: ' + target.src + ' could not be loaded.'); }