Commit 672c8287 by Alexander Makarov

Merge pull request #3175 from yiisoft/fix-exception-hierarchy

Fix exception hierarchy
parents 7e16837b 20e4abea
......@@ -4,7 +4,7 @@ Yii Framework 2 twig extension Change Log
2.0.0-rc under development
--------------------------
- no changes in this release.
- Bug #2925: Fixed throwing exception when accessing AR property with null value (samdark)
2.0.0-beta April 13, 2014
......
......@@ -20,6 +20,7 @@ Yii Framework 2 Change Log
- Enh: Added support for using sub-queries when building a DB query with `IN` condition (qiangxue)
- Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue)
- Enh: Added `yii\web\UrlManager::addRules()` to simplify adding new URL rules (qiangxue)
- Chg #3175: InvalidCallException, InvalidParamException, UnknownMethodException are now extended from SPL BadMethodCallException (samdark)
- Chg: Replaced `clearAll()` and `clearAllAssignments()` in `yii\rbac\ManagerInterface` with `removeAll()`, `removeAllRoles()`, `removeAllPermissions()`, `removeAllRules()` and `removeAllAssignments()` (qiangxue)
- Chg: Added `$user` as the first parameter of `yii\rbac\Rule::execute()` (qiangxue)
......
......@@ -13,7 +13,7 @@ namespace yii\base;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class InvalidCallException extends Exception
class InvalidCallException extends \BadMethodCallException
{
/**
* @return string the user-friendly name of this exception
......
......@@ -13,7 +13,7 @@ namespace yii\base;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class InvalidParamException extends Exception
class InvalidParamException extends \BadMethodCallException
{
/**
* @return string the user-friendly name of this exception
......
......@@ -214,7 +214,7 @@ class Object
*/
public function __call($name, $params)
{
throw new UnknownMethodException('Unknown method: ' . get_class($this) . "::$name()");
throw new UnknownMethodException('Calling unknown method: ' . get_class($this) . "::$name()");
}
/**
......
......@@ -13,7 +13,7 @@ namespace yii\base;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class UnknownMethodException extends Exception
class UnknownMethodException extends \BadMethodCallException
{
/**
* @return string the user-friendly name of this exception
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment