diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a33ad8669..5b8c06f43e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/PhpWord/Style/AbstractStyle.php b/src/PhpWord/Style/AbstractStyle.php index aec490b5a1..ab1a1ee729 100644 --- a/src/PhpWord/Style/AbstractStyle.php +++ b/src/PhpWord/Style/AbstractStyle.php @@ -284,7 +284,7 @@ protected function setFloatVal($value, $default = null) 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; }