diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-06-19 13:49:07 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-06-19 13:49:07 +0200 |
commit | ca60a32c601fe9b0236d3d4717c7b94368a3c172 (patch) | |
tree | 882756690ee8e446f7fc9e3ba14313151eddf423 /include/array.h | |
parent | c6c68cbc60711b43e8a570d708db3768240fcc5a (diff) |
errors are no longer thrown as exceptions, but are php fatal errors, so that they more closely match the zend error reporting system
Diffstat (limited to 'include/array.h')
-rw-r--r-- | include/array.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/array.h b/include/array.h index 0b6ceb9..4d6b6b1 100644 --- a/include/array.h +++ b/include/array.h @@ -31,7 +31,7 @@ public: Array(const Value &value) : Value(value) { // type must be valid - if (value.type() != Type::Array) throw Php::Exception("Assigning a non-array to an array variable"); + if (value.type() != Type::Array) throw FatalError("Assigning a non-array to an array variable"); } /** @@ -41,7 +41,7 @@ public: Array(Value &&value) : Value(std::move(value)) { // type must be valid - if (value.type() != Type::Array) throw Php::Exception("Moving a non-array to an array variable"); + if (value.type() != Type::Array) throw FatalError("Moving a non-array to an array variable"); } /** @@ -76,7 +76,7 @@ public: virtual Value &setType(Type type) override { // throw exception if things are going wrong - if (type != Type::Array) throw Php::Exception("Changing type of a fixed array variable"); + if (type != Type::Array) throw FatalError("Changing type of a fixed array variable"); // call base return Value::setType(Type::Array); @@ -93,7 +93,7 @@ public: if (this == &value) return *this; // type must be valid - if (value.type() != Type::Array) throw Php::Exception("Assigning a non-array to a fixed array variable"); + if (value.type() != Type::Array) throw FatalError("Assigning a non-array to a fixed array variable"); // call base Value::operator=(value); @@ -113,7 +113,7 @@ public: if (this == &value) return *this; // type must be valid - if (value.type() != Type::Array) throw Php::Exception("Moving a non-array to a fixed array variable"); + if (value.type() != Type::Array) throw FatalError("Moving a non-array to a fixed array variable"); // call base Value::operator=(std::move(value)); |