Throw more specific exception

This commit is contained in:
Christian Bläul
2018-02-20 21:39:38 +01:00
parent d484f3e9e3
commit a7f2bbb7bc

View File

@@ -45,7 +45,7 @@ trait DatatypeTrait {
* *
* @access public * @access public
* *
* @uses getDatatypeFromString * @uses getDatatypeFromString
* *
* @return array|bool * @return array|bool
*/ */
@@ -54,7 +54,7 @@ trait DatatypeTrait {
$this->data = $this->parse_string(); $this->data = $this->parse_string();
} }
if (!is_array($this->data)) { if (!is_array($this->data)) {
throw new \Exception('No data set yet.'); throw new \UnexpectedValueException('No data set yet.');
} }
$result = []; $result = [];