Use original cell value event if cell contain error to generate more helpful exception message (in case of objects, for example)
This commit is contained in:
parent
1a06aa624d
commit
8b3b832359
@ -243,7 +243,7 @@ class WorksheetManager implements WorksheetManagerInterface
|
||||
} elseif ($cell->isEmpty()) {
|
||||
$data .= '/>';
|
||||
} else {
|
||||
$value = $cell->getValue();
|
||||
$value = $cell->getValueEvenIfError();
|
||||
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . (\is_object($value) ? \get_class($value) : \gettype($value)));
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ EOD;
|
||||
$cellXML = '';
|
||||
}
|
||||
} else {
|
||||
$value = $cell->getValue();
|
||||
$value = $cell->getValueEvenIfError();
|
||||
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . (\is_object($value) ? \get_class($value) : \gettype($value)));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user