Skip to content

Commit

Permalink
Fix #6158: Log for interpolate url issue (#7952)
Browse files Browse the repository at this point in the history
* Adds log

* fix lint issues
  • Loading branch information
Kevin Thomas authored and vojtechjelinek committed Nov 10, 2019
1 parent dc79a6b commit 4fe6c61
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,19 @@ angular.module('oppia').directive('oppiaNoninteractiveImage', [
// preview mode. We don't have loading indicator or try again for
// showing images in the exploration editor or in preview mode. So
// we directly assign the url to the imageUrl.
ctrl.imageUrl = AssetsBackendApiService.getImageUrlForPreview(
ContextService.getEntityType(), ContextService.getEntityId(),
ctrl.filepath);
try {
ctrl.imageUrl = AssetsBackendApiService.getImageUrlForPreview(
ContextService.getEntityType(), ContextService.getEntityId(),
ctrl.filepath);
} catch (e) {
var additionalInfo = (
'\nExploration ID: ' + ContextService.getExplorationId() +
'\nEntity type: ' + ContextService.getEntityType() +
'\nEntity ID: ' + ContextService.getEntityId() +
'\nFilepath: ' + ctrl.filepath);
e.message += additionalInfo;
throw e;
}
}

ctrl.imageCaption = '';
Expand Down

0 comments on commit 4fe6c61

Please sign in to comment.