Merge pull request #633 from MITx/feature/ichuang/histogram-try-catch

put try-catch around histogram coffeescript code
This commit is contained in:
David Ormsbee
2012-09-06 08:34:13 -07:00

View File

@@ -14,4 +14,9 @@ class @Courseware
XModule.loadModules('display')
$('.course-content .histogram').each ->
id = $(this).attr('id').replace(/histogram_/, '')
new Histogram id, $(this).data('histogram')
try
histg = new Histogram id, $(this).data('histogram')
catch error
histg = error
console.log(error)
return histg