Skip to content

Commit

Permalink
Found a null return from the provider, replaced with an ItemNotFoundE…
Browse files Browse the repository at this point in the history
…xception which is much easier to handle downstream.
  • Loading branch information
rogier.oudshoorn@gmail.com committed Jun 3, 2014
1 parent 99e17f5 commit e90104e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -85,8 +85,8 @@ public ComponentPresentation getDynamicComponentPresentation(
if (cp == null) {
logger.debug("component presentation NOT found by template");

// no cp found, and they asked for a template, means we return null
return null;
// no cp found, and they asked for a template, means we have to throw an exception
throw new ItemNotFoundException("Unable to find DCP by template for pub "+publicationId+", item "+componentId+" and template "+templateId);
}

logger.debug("component presentation found by template. ");
Expand Down

0 comments on commit e90104e

Please sign in to comment.