diff --git a/src/Spout/Writer/ODS/Manager/WorksheetManager.php b/src/Spout/Writer/ODS/Manager/WorksheetManager.php index cf47f5a..3b8da63 100644 --- a/src/Spout/Writer/ODS/Manager/WorksheetManager.php +++ b/src/Spout/Writer/ODS/Manager/WorksheetManager.php @@ -245,7 +245,12 @@ class WorksheetManager implements WorksheetManagerInterface } else { $value = $cell->getValueEvenIfError(); - throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . (\is_object($value) ? \get_class($value) : \gettype($value))); + $errorMessage = 'Trying to add a value with an unsupported type: ' . \gettype($value); + if (\is_object($value)) { + $errorMessage .= ' (' . \get_class($value) . ' given)'; + } + + throw new InvalidArgumentException($errorMessage); } return $data;