Skip to content

Commit

Permalink
Do not use generic Exception type.
Browse files Browse the repository at this point in the history
  • Loading branch information
xingwu1 committed Jun 7, 2016
1 parent ddacda3 commit c313bcb
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,13 @@ private string GetPagingSetting(CompositeType body, Dictionary<string, object> e

if (!findNextLink)
{
throw new Exception("Couldn't find the nextLink property specified by extension");
throw new KeyNotFoundException("Couldn't find the nextLink property specified by extension");
}
if (!findItem)
{
throw new Exception("Couldn't find the item property specified by extension");
throw new KeyNotFoundException("Couldn't find the item property specified by extension");
}

// TODO: Need to validate the nextLinkName is in the type
var pageModel = new PageTemplateModel(className, nextLinkName, itemName, valueTypeName);
if (!pageModels.Contains(pageModel))
{
Expand Down

0 comments on commit c313bcb

Please sign in to comment.