035a3e23f00506e296594de78646d68e0d6125f2 larrym Wed Feb 22 13:05:25 2012 -0800 use stripJsEmbedded to catch and report more errors/warnings in updateImgAndMap diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index c6e59df..9cd353a 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -2610,30 +2610,33 @@ cache: false }); }, updateImgAndMap: function (response, status) { // Handle ajax response with an updated trackMap image, map and optional ideogram. // // this.cmd can be used to figure out which menu item triggered this. // this.id == appropriate track if we are retrieving just a single track. // update local hgTracks.trackDb to reflect possible side-effects of ajax request. var json = scrapeVariable(response, "hgTracks"); var oldTrackDb = hgTracks.trackDb; var valid = false; if(json == undefined) { + var stripped = new Object(); + stripJsEmbedded(response, true, stripped); + if(stripped.warnMsg == null) showWarning("hgTracks object is missing from the response"); } else if (json.err) { showWarning("Request failed; error: " + json.err); } else { if(this.id != null) { if(json.trackDb[this.id]) { var visibility = vis.enumOrder[json.trackDb[this.id].visibility]; var limitedVis; if(json.trackDb[this.id].limitedVis) limitedVis = vis.enumOrder[json.trackDb[this.id].limitedVis]; if(this.newVisibility && limitedVis && this.newVisibility != limitedVis) // see redmine 1333#note-9 alert("There are too many items to display the track in " + this.newVisibility + " mode."); var rec = hgTracks.trackDb[this.id];