From 474f8ef2f77762acf79cf76e8a660b1aa0d6e48f Mon Sep 17 00:00:00 2001 From: h6w Date: Mon, 29 Dec 2014 18:16:05 +1100 Subject: [PATCH 1/2] Update AbstractStyle.php --- src/PhpWord/Style/AbstractStyle.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } From 7d2c0a693753e6eb4b60b9746f9fb8c3b5bc5529 Mon Sep 17 00:00:00 2001 From: h6w Date: Mon, 29 Dec 2014 18:20:39 +1100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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