Handle invalid (object) value in cell value while generating exception message - add classname to message
This commit is contained in:
parent
9533accd73
commit
1a06aa624d
@ -243,7 +243,9 @@ class WorksheetManager implements WorksheetManagerInterface
|
||||
} elseif ($cell->isEmpty()) {
|
||||
$data .= '/>';
|
||||
} else {
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . \gettype($cell->getValue()));
|
||||
$value = $cell->getValue();
|
||||
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . (\is_object($value) ? \get_class($value) : \gettype($value)));
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
@ -253,7 +253,9 @@ EOD;
|
||||
$cellXML = '';
|
||||
}
|
||||
} else {
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . \gettype($cell->getValue()));
|
||||
$value = $cell->getValue();
|
||||
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . (\is_object($value) ? \get_class($value) : \gettype($value)));
|
||||
}
|
||||
|
||||
return $cellXML;
|
||||
|
Loading…
x
Reference in New Issue
Block a user