Merge pull request #458 from h6w/develop

Report enumerated style options available when style unknown.
This commit is contained in:
Progi1984 2014-12-29 08:35:42 +01:00
commit d4d498d698
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap
- MsDOC Reader: Basic MsDOC Reader - @Progi1984 GH-23 GH-287
- "absolute" horizontal and vertical positioning of Frame - @basjan GH-302
- Add new-page function for PDF generation. For multiple PDF-backends - @chc88 GH-426
- Report style options enumerated when style unknown - @h6w
### Bugfixes

View File

@ -284,7 +284,7 @@ abstract class AbstractStyle
protected function setEnumVal($value = null, $enum = array(), $default = null)
{
if ($value != null && trim($value) != '' && !empty($enum) && !in_array($value, $enum)) {
throw new \InvalidArgumentException("Invalid style value: {$value}");
throw new \InvalidArgumentException("Invalid style value: {$value} Options:".join(',', $enum));
} elseif ($value === null || trim($value) == '') {
$value = $default;
}