Skip to content

Commit

Permalink
catch ClassCastException and bail out #3747
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Apr 7, 2017
1 parent a496eac commit f74fe41
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ public static String getImageThumbAsBase64(DataFile file, int size) {
try {

fileAccess = (FileAccessIO) file.getAccessObject();
} catch (ClassCastException ex) {
logger.warning("Unable to cast file id " + file.getId() + " from DataFileIO to FileAccessIO.");
return null;
} catch (IOException ex) {
// too bad - but not fatal
logger.warning("getImageThumbAsBase64: Failed to obtain FileAccess object for DataFile id " + file.getId());
Expand Down

0 comments on commit f74fe41

Please sign in to comment.