Skip to content

Commit

Permalink
Updated FormElement, resolveHelper() throws better exception when ele…
Browse files Browse the repository at this point in the history
…ment helper can't be resolved
  • Loading branch information
bacinsky committed Jan 28, 2014
1 parent 3f418c9 commit 0a89479
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/WebinoDraw/Form/View/Helper/FormElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ public function resolveHelper(ElementInterface $element)
return $renderer->plugin('form_' . $type);
}

throw new \OutOfRangeException('Unknown type of ' . get_class($element));
throw new \OutOfRangeException(
sprintf('Unknown element `%s` type `%s` of `%s`',
$element->getName(),
$type,
get_class($element)
)
);
}

/**
Expand Down

0 comments on commit 0a89479

Please sign in to comment.